Configuration arrays

Hello. I’ve just started learning Yii and I’ve been seeing a lot of configuration arrays being passed around. Most of the time I’m having a hard time trying to see which configs are possible, or which value should be passed to a config. Is there some sort of cheat sheet for these configs? Or tips how to find them easier?

One particular issue I had is adding autocomplete widget. After adding it, the input did not look the same as the bootstrap inputs. Here we can add config on field() or widget(), however when I followed the functions, I could not find out how the config array should look like. After some googling I was already able to add bootstrap class to it.




    <?= $form->field($model, 'driver_id')->widget(AutoComplete::className(), 

        [

            'clientOptions' => [

                'source' => '/driver/find/',

            ]            

        ]); ?>

    

    <?= $form->field($model, 'vehicle_id')->textInput() ?>



Sorry if the example might seem a bit shallow.

You can refer to the API documentation to find out which properties are available:

http://www.yiiframework.com/doc-2.0/yii-jui-autocomplete.html