本文整理汇总了PHP中yii\gii\Generator::hints方法的典型用法代码示例。如果您正苦于以下问题:PHP Generator::hints方法的具体用法?PHP Generator::hints怎么用?PHP Generator::hints使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\gii\Generator
的用法示例。
在下文中一共展示了Generator::hints方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hints
/**
* @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 MongoDB application component.', 'collectionName' => 'This is the name of the MongoDB collection that the new ActiveRecord class is associated with, e.g. <code>post</code>.', 'databaseName' => 'This is the name of the MongoDB database, which contains the collection that the new ActiveRecord class is associated with.
You may leave this field blank, if your application uses single MongoDB database.', 'attributeList' => 'List of the collection attribute names separated by coma.
You do not need to specify "_id" attribute here - it will be added automatically.', '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 may leave this field blank - in this case class name
will be generated automatically.', 'baseClass' => 'This is the base class of the new ActiveRecord class. It should be a fully qualified namespaced class name.']);
}
示例2: hints
/**
* @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>.', '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>.', 'moduleID' => 'This is the ID of the module that the generated controller will belong to.
If not set, it means the controller will belong to the application.', '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\\search\\PostSearch</code>.']);
}
示例3: init
/**
* @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]);
}
}
}
示例4: hints
/**
* @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>.', '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>.']);
}
示例5: hints
/**
* @inheritdoc
*/
public function hints()
{
return array_merge(parent::hints(), ['migrationPath' => 'Path to store generated file, e.g., <code>@app/migrations</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>.', 'migrationName' => 'The name of the new migration. This should only contain letters, digits and/or underscores.', 'migrationTime' => 'Time of the new migration. This should only has format <code>yymmdd_hhiiss</code>.', '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.', 'useTablePrefix' => 'This indicates whether the table name returned by the generated migration
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 migration
will use the table name as <code>{{%post}}</code>.']);
}
示例6: hints
/**
* @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 Sphinx application component.', 'indexName' => 'This is the name of the Sphinx index that the new ActiveRecord class is associated with, e.g. <code>post</code>.
The index name may end with asterisk to match multiple table names, e.g. <code>idx_*</code>
will match indexes, which name starts with <code>idx_</code>. In this case, multiple ActiveRecord classes
will be generated, one for each matching index name; and the class names will be generated from
the matching characters. For example, index <code>idx_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 "Index 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.', 'useIndexPrefix' => 'This indicates whether the index name returned by the generated ActiveRecord class
should consider the <code>tablePrefix</code> setting of the Sphinx connection. For example, if the
index name is <code>idx_post</code> and <code>tablePrefix=idx_</code>, the ActiveRecord class
will return the table name as <code>{{%post}}</code>.']);
}
示例7: hints
/**
* @inheritdoc
*/
public function hints()
{
return array_merge(parent::hints(), ['ns' => 'This is the namespace of the Model class to be generated, e.g., <code>Core\\Model</code>', 'tableName' => 'This is the name of the DB table that the new Model class is associated with, e.g. <code>User</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.']);
}
示例8: hints
/**
* @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.']);
}
示例9: hints
/**
* @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.', '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.']);
}
示例10: hints
/**
* @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.', 'imagesDomain' => 'Images sub-domain pattern, e.g., <code>img.{$domain}</code> on domain <code>test.com</code>
will be render as <code>img.test.com</code>, also you can set the full domain name, e.g., <code>images.example.com</code>.
Be sure that the web root of this domain linked to your <code>imagesPath</code>.', 'imagesPath' => 'This is a path to upload images. May be path alias use this, e.g., <code>@app/web/img</code>', 'addingI18NStrings' => 'Enables the adding non existing I18N strings to the message category files.', 'messagesPaths' => 'This is a path to I18N messages, ability to set multiple directories separated by commas, e.g.
<code>@backend/messages,@frontend/messages</code>']);
}
示例11: hints
/**
* @inheritdoc
*/
public function hints()
{
return array_merge(parent::hints(), ['tableName' => 'You can use "*" for all tables, or "," to separate tables', 'migrationName' => 'Note that you should check the result migration code after generation and perform some corrections if needed, mostly due to inconsistency between MySQL and PHP types.', 'useSafe' => 'DB logic implemented in "Safe Mode" will be enclosed within a DB transaction', 'migrationDataType' => 'Please select the data you want to include in the migration', 'dropTable' => 'Drop Table if exists in DB']);
}
示例12: hints
/**
* @inheritdoc
*/
public function hints()
{
return array_merge(parent::hints(), ['ns' => 'This is the namespace of the Eloquent class to be generated, e.g., <code>app\\models</code>', 'path' => 'This is the full server path for the location of the Eloquent models', 'db' => 'This is the ID of the DB application component.', 'tableName' => 'This is the name of the DB table that the new Eloquent 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 Eloquent 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 Eloquent 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 Eloquent classes will be generated.', 'baseClass' => 'This is the base class of the new Eloquent 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 Eloquent 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 Eloquent class
will return the table name as <code>{{%post}}</code>.']);
}
示例13: hints
/**
* @inheritdoc
*/
public function hints()
{
return array_merge(parent::hints(), ['path' => 'Specify the directory for storing the migration for your block. You may use path alias here, e.g.,
<code>@app/migrations</code>', 'pages' => 'Select pages for which you want to generate migration. You may select multiple pages.']);
}
示例14: hints
/**
* @inheritdoc
*/
public function hints()
{
return array_merge(parent::hints(), ['db' => 'This is the ID of the DB application component.', 'tableName' => 'Use "*" for all table, mask support - as "tablepart*", or you can separate table names by comma ', 'tableIgnore' => 'You can separate some table names by comma, for ignor ', 'templatePath' => 'Path for you templates/fixtures', 'datalimit' => '', 'genmode' => 'You can generate fixture templates or fixtures based on table data ']);
}
示例15: hints
/**
* @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>.', 'actions' => 'Provide one or multiple action IDs to generate empty action method(s) in the controller. Separate multiple action IDs with commas or spaces.
Action IDs should be in lower case. For example:
<ul>
<li><code>index</code> generates <code>actionIndex()</code></li>
<li><code>create-order</code> generates <code>actionCreateOrder()</code></li>
</ul>', 'nsSearchModel' => 'This is the namespace of the search model class to be generated, e.g., <code>app\\models</code>', 'nsController' => 'This is the namespace of the Controller class to be generated, e.g., <code>app\\controllers</code>']);
}