I’ve been learning Yii2.0 (and developing a new app) for last 3 months.
As expected it’s quite a difficult and steep learning curve but I’m persevering…
One thing I am noticing though is when using the provided docs I seem to get to dead ends.
ie: the trail of information seems to end…
e.g.
"Creating Forms"
http://www.yiiframework.com/doc-2.0/guide-input-forms.html
If I look at example code
$form = ActiveForm::begin([
'id' => 'login-form',
'options' => ['class' => 'form-horizontal'],
And in the description below it says…
"As with any widget, you can specify some options as to how the widget should be configured by passing an array to the begin method. In this case, an extra CSS class and identifying ID are passed to be used in the opening <form> tag. For all available options, please refer to the API documentation of yii\widgets\ActiveForm."
After clicking link in documentation and searching for begin() it tells me this…
public static static begin ( $config = [] )
OK - I’m getting closer to the truth…
$config array Name-value pairs that will be used to initialize the object properties
And that’s it?
No mention of
'options' => ['class' => 'form-horizontal']
Where are the exact parameters that such a function offers?
How can I find that level of information out???
(my current problem is getting my model to output a list of checkboxes, dynamically "checked" depending on a search from my controller)
Any advice on being able to read or understand how the documanetation can serve me better would be greatly appreciated.