/** * @inheritdoc */ public function init() { $stickyAttributes = $this->model->stickyAttributes(); if (in_array($this->attribute, $stickyAttributes)) { $this->sticky(); } $hints = $this->model->hints(); if (isset($hints[$this->attribute])) { $this->hint($hints[$this->attribute]); } $autoCompleteData = $this->model->autoCompleteData(); if (isset($autoCompleteData[$this->attribute])) { if (is_callable($autoCompleteData[$this->attribute])) { $this->autoComplete(call_user_func($autoCompleteData[$this->attribute])); } else { $this->autoComplete($autoCompleteData[$this->attribute]); } } }
/** * @inheritdoc */ public function hints() { return array_merge(parent::hints(), ['modelClass' => 'This is the ActiveRecord class associated with the table that CRUD will be built upon. You should provide a fully qualified class name, e.g., <code>app\\models\\Post</code>.', 'controllerClass' => 'This is the name of the controller class to be generated. You should provide a fully qualified namespaced class (e.g. <code>app\\controllers\\PostController</code>), and class name should be in CamelCase with an uppercase first letter. Make sure the class is using the same namespace as specified by your application\'s controllerNamespace property.', 'viewPath' => 'Specify the directory for storing the view scripts for the controller. You may use path alias here, e.g., <code>/var/www/basic/controllers/views/post</code>, <code>@app/views/post</code>. If not set, it will default to <code>@app/views/ControllerID</code>', 'baseControllerClass' => 'This is the class that the new CRUD controller class will extend from. You should provide a fully qualified class name, e.g., <code>yii\\web\\Controller</code>.', 'indexWidgetType' => 'This is the widget type to be used in the index page to display list of the models. You may choose either <code>GridView</code> or <code>ListView</code>', 'searchModelClass' => 'This is the name of the search model class to be generated. You should provide a fully qualified namespaced class name, e.g., <code>app\\models\\PostSearch</code>.', 'enablePjax' => 'This indicates whether the generator should wrap the <code>GridView</code> or <code>ListView</code> widget on the index page with <code>yii\\widgets\\Pjax</code> widget. Set this to <code>true</code> if you want to get sorting, filtering and pagination without page refreshing.']); }
/** * @inheritdoc */ public function hints() { return array_merge(parent::hints(), ['ns' => 'This is the namespace of the ActiveRecord class to be generated, e.g., <code>app\\models</code>', 'db' => 'This is the ID of the DB application component.', 'tableName' => 'This is the name of the DB table that the new ActiveRecord class is associated with, e.g. <code>post</code>. The table name may consist of the DB schema part if needed, e.g. <code>public.post</code>. The table name may end with asterisk to match multiple table names, e.g. <code>tbl_*</code> will match tables who name starts with <code>tbl_</code>. In this case, multiple ActiveRecord classes will be generated, one for each matching table name; and the class names will be generated from the matching characters. For example, table <code>tbl_post</code> will generate <code>Post</code> class.', 'modelClass' => 'This is the name of the ActiveRecord class to be generated. The class name should not contain the namespace part as it is specified in "Namespace". You do not need to specify the class name if "Table Name" ends with asterisk, in which case multiple ActiveRecord classes will be generated.', 'baseClass' => 'This is the base class of the new ActiveRecord class. It should be a fully qualified namespaced class name.', 'generateRelations' => 'This indicates whether the generator should generate relations based on foreign key constraints it detects in the database. Note that if your database contains too many tables, you may want to uncheck this option to accelerate the code generation process.', 'generateLabelsFromComments' => 'This indicates whether the generator should generate attribute labels by using the comments of the corresponding DB columns.', 'useTablePrefix' => 'This indicates whether the table name returned by the generated ActiveRecord class should consider the <code>tablePrefix</code> setting of the DB connection. For example, if the table name is <code>tbl_post</code> and <code>tablePrefix=tbl_</code>, the ActiveRecord class will return the table name as <code>{{%post}}</code>.', 'useSchemaName' => 'This indicates whether to include the schema name in the ActiveRecord class when it\'s auto generated. Only non default schema would be used.', 'generateQuery' => 'This indicates whether to generate ActiveQuery for the ActiveRecord class.', 'queryNs' => 'This is the namespace of the ActiveQuery class to be generated, e.g., <code>app\\models</code>', 'queryClass' => 'This is the name of the ActiveQuery class to be generated. The class name should not contain the namespace part as it is specified in "ActiveQuery Namespace". You do not need to specify the class name if "Table Name" ends with asterisk, in which case multiple ActiveQuery classes will be generated.', 'queryBaseClass' => 'This is the base class of the new ActiveQuery class. It should be a fully qualified namespaced class name.']); }
/** * @inheritdoc */ public function hints() { return array_merge(parent::hints(), ['modelClass' => 'This is the model class for collecting the form input. You should provide a fully qualified class name, e.g., <code>app\\models\\Post</code>.', 'viewName' => 'This is the view name with respect to the view path. For example, <code>site/index</code> would generate a <code>site/index.php</code> view file under the view path.', 'viewPath' => 'This is the root view path to keep the generated view files. You may provide either a directory or a path alias, e.g., <code>@app/views</code>.', 'scenarioName' => 'This is the scenario to be used by the model when collecting the form input. If empty, the default scenario will be used.']); }