Available Commands
Command | 使用方法 |
---|---|
about 显示有关 Drupal Console 项目的基本信息 | |
chain 链命令执行 | drupal chain \
--file="/path/to/file/chain-file.yml" |
check 系统需求检查器 | |
composerize Converts Drupal codebase to composer. | |
exec 执行一个外部命令 | |
help 显示帮助 | |
init 拷贝配置文件到用户的 home 目录 | |
list 列出当前可用命令 | |
shell 打开一个提供交互式REPL(Read–Eval–Print-Loop) shell. | |
server 运行PHP内建的网站服务器 | Drupal服务器 Drupal服务器127.0.0.1:8089 Drupal --root=/var/www/drupal8.dev server |
snippet Runs PHP code | drupal snippet --file=/path/to/file drupal snippet --code=codeToExecute drupal snippet --show-code --file=/path/to/file |
cache:rebuild 重建和清除所有网站缓存。 | drupal cr all drupal cr discovery |
cache:tag:invalidate Invalidate cache tags. | drupal cti routes drupal cti node:1 node_list |
config:delete 删除配置 | drupal config:delete active all |
config:diff 比对目录,输出与活动配置不同的配置项。 | drupal config:diff ../config/path |
config:edit 使用文本编辑器更改配置对象。 | drupal config:edit system.cron drupal config:edit system.cron gedit |
config:export 导出当前应用配置。 | drupal config:export \
--directory="path/to/export"
drupal config:export \
--directory="path/to/export" \
--tar \
--remove-uuid \
--remove-config-hash
|
config:export:content:type 导出特定的内容类型及其字段。 | drupal config:export:content:type page \
--module="demo"
drupal config:export:content:type page \
--module="demo" \
--optional-config
|
config:export:entity Export a specific config entity and their fields. | drupal config:export:entity node_type page \
--module="demo" drupal config:export:entity node_type page \
--module="demo" \
--optional-config \
--remove-uuid \
--remove-config-hash
|
config:export:single 将单个配置或一系列配置导出为 yml 文件。 | drupal config:export:single \
--name=config.settings.name drupal config:export:single \
--name=config.settings.name \
--remove-uuid \
--remove-config-hash
|
config:export:view 在提供的模块中导出 YAML 格式的视图,以便在其他网站中重复使用。 | drupal config:export:view viewid drupal config:export:view viewid \
--module="modulename" \
--optional-config \
--include-module-dependencies
drupal config:export:view viewid \
--module="modulename" \
--optional-config \
--include-module-dependencies |
config:import 将配置导入当前应用程序。 | drupal config:import \
--file=/path/to/config/file
drupal config:import \
--directory=/path/to/config/dir
|
config:import:single 导入单个配置或一系列配置。 | drupal config:import:single \
--file="/path/to/file/block.block.default_block.yml"
drupal config:import:single \
--file="block.block.default_block.yml" \
--directory="/path/to/directory"
|
config:override 覆盖活动配置中的配置值。 | drupal config:override contact.settings flood.limit 10 |
config:validate 根据其 Schema 验证 drupal 配置 | drupal config:validate configuration.name |
create:comments 为您的 Drupal 8 应用程序创建评论。 | drupal create:comments node-id drupal create:comments node-id \
--limit="2" \
--title-words="5" \
--time-range="1"
|
create:nodes 为您的 Drupal 8 应用程序创建节点。 | drupal create:nodes content-name drupal create:nodes content-name \
--limit="5" \
--title-words="5" \
--time-range="1" \
--language="und"
|
create:roles Create dummy roles for your Drupal 8 application. | drupal create:roles drupal create:roles
|
create:terms 为您的 Drupal 8 应用程序创建术语。 | drupal create:terms vocabulary drupal create:terms tags \
--limit="10" \
--name-words="5"
|
create:users 为您的 Drupal 8 应用程序创建用户。 | drupal create:users role drupal create:users role \
--limit="5" \
--password="usersnewpassword" \
--time-range="1"
|
create:vocabularies 为您的 Drupal 8 应用程序创建词汇表。 | drupal create:vocabularies \
--limit="5" \
--name-words="5"
|
cron:execute 执行模块实现的计划任务或执行所有计划任务 | drupal cron:execute
drupal cron:execute \
<module>
|
cron:release 释放定时任务系统锁,再次重新运行定时任务 | drupal cron:execute
|
database:add 添加数据库到 settings.php | drupal database:add \
--database=DATABASE \
--username=USERNAME \
--password=PASSWORD
|
database:client 启动数据库客户端(如果可用) | drupal database:client <database>
|
database:connect 显示 DB 连接 | drupal database:connect \
<database>
|
database:drop 删除给定数据库中的所有表。 | drupal database:drop \
<database>
|
database:dump 转储数据库结构和内容 | drupal database:dump \
<database>
drupal database:dump \
--gz
|
database:log:clear 从 DBLog 表中删除事件,过滤器可用 | drupal database:log:clear \
<database>
drupal database:log:clear \
<database> \
--type=TYPE \
--severity=SEVERITY
|
database:log:poll 轮询看门狗并每 x 秒打印一次新的日志条目 | drupal database:log:poll \
100
|
database:query 直接作为参数执行 SQL 语句 | drupal database:query 'select * from node limit 0,1'
|
database:restore 还原数据库结构和内容。 | drupal database:restore \
--file='/srv/dump/db.sql'
|
debug:breakpoints 显示应用程序中可用的断点 | drupal breakpoints:debug bartik |
debug:cache:context 显示应用程序的当前缓存上下文。 | drupal debug:cache:context
|
debug:chain 列出可用的链命令文件。 | |
debug:config 列出配置对象名称和单个配置对象。 | drupal config:debug drupal config:debug system.site drupal config:debug | grep system drupal debug:config --show-overridden |
debug:config:settings 显示当前设置文件的键值对。 | drupal debug:config:settings
|
debug:config:validate 在安装模块之前验证 schema 实现。 | drupal debug:config:validate \
/path/to/file \
/path/to/schema-filepath
|
debug:container 显示应用程序的当前服务。 | drupal debug:container views.views_data_helper
|
debug:cron 实现计划任务的模块列表 | drupal debug:cron
|
debug:database:log 显示应用程序的当前日志事件 | drupal debug:database:log
drupal debug:database:log 21228
|
debug:database:table 显示给定数据库中的所有表。 | drupal debug:database:table
drupal debug:database:table node
|
debug:dotenv Debug Dotenv debug values. | |
debug:entity 调试系统中可用的实体 | drupal debug:entity
|
debug:event 显示当前事件 | drupal debug:evet
drupal debug:event kernel.request
|
debug:features 列出注册的功能。 | |
debug:hook commands.debug.hook.description | |
debug:image:styles 列出网站上的图片样式 | drupal debug:image:styles
|
debug:libraries 显示应用程序中可用的库 | drupal debug:libraries
drupal debug:libraries block
drupal debug:libraries block/drupal.block
|
debug:migrate 显示可用于应用程序的当前迁移 | drupal debug:migrate
|
debug:module 显示可用于应用的当前模块 | drupal mod --status=installed drupal mod --status=installed --type=no-core |
debug:multisite 列出系统中可用的所有多站点 | drupal debug:multisite
|
debug:permission 显示所有用户权限。 | drupal debug:permission
|
debug:plugin 显示所有插件类型。 | drupal debug:plugin drupal debug:plugin block drupal debug:plugin block broken
|
debug:queue 显示应用中的队列(s) | drupal debug:queue
|
debug:rest 显示应用程序的当前 REST 资源 | drupal debug:rest
|
debug:roles Displays current roles for the application | drupal debug:roles
|
debug:router 显示应用程序的当前路由或特定路由的信息 | drupal rod drupal rod user.page drupal debug:router drupal debug:router user.login drupal debug:router --pattern=/user/login |
debug:settings 列出用户的 Drupal Console 设置。 | drupal debug:settings
|
debug:site 列出所有已知的本地和远程站点。 | drupal debug:site
|
debug:state 显示当前的状态键。 | drupal debug:state
drupal debug:state install_task
|
debug:theme 显示应用程序的当前主题 | drupal debug:theme drupal debug:theme bartik
|
debug:theme:keys Displays all theme keys provided by hook_theme functions | |
debug:update 显示可用于应用程序的当前更新 | drupal debug:update
|
debug:update:composer Displays current updates available from the composer file | drupal debug:update:composer
|
debug:user 显示应用程序的当前用户 | drupal debug:user
|
debug:views 显示应用程序的当前视图资源 | drupal debug:views
|
debug:views:plugins 显示应用程序的当前视图插件 | drupal debug:views:plugins
|
devel:dumper commands.devel.dumper.messages.change-devel-dumper-plugin | |
docker:init Create a docker-compose.yml file | |
dotenv:init Add support and required config to work with an .env file | |
entity:delete Delete an specific entity | drupal entity:delete node 1 |
features:import 导入模块配置 | |
field:info View information about fields. | |
generate:ajax:command Generate & Register a custom ajax command | |
generate:authentication:provider 生成认证提供者 | drupal generate:authentication:provider \
--module="modulename" \
--class="DefaultAuthenticationProvider" \
--provider-id="default_authentication_provider"
|
generate:breakpoint 生成断点 | drupal generate:breakpoint \
--theme="classy" \
--breakpoints='"breakpoint_name":"narrow", "breakpoint_label":"narrow", "breakpoint_media_query":"all and (min-width: 560px) and (max-width: 850px)", "breakpoint_weight":"1", "breakpoint_multipliers":"1x"' |
generate:cache:context Generate a cache context | drupal generate:cache:context \
--module="modulename" \
--cache-context="ContextName" \
--class="DefaultCacheContext" |
generate:command 生成新 Console 命令 | drupal generate:command \
--extension="ExtensionName" \
--extension-type="module" \
--class="DefaultCommand" \
--name="CommandName" |
generate:composer Generate a composer.json file | drupal generate:composer \
--module="module_name" \
--name="drupal/module_name" \
--type="drupal-module" \
--description="Package description" \
--keywords='Drupal' --keywords='logging' \
--license="GPL-2.0+" \
--homepage="https://www.drupal.org/project/module_name" \
--minimum-stability="stable" \
--authors='"name":"Author name", "email":"author@email.com", "homepage":"http://website.com", "role":"Developer"' \
--support='"channel":"email", "url":"author@email.com"' \
--support='"channel":"source", "url":"http://github.com"' \
--required='"name":"drupal/views", "version":"^1.0"' \
--required='"name":"drupal/token", "version":"^2.0"'
|
generate:controller 生成并注册新控制器 | drupal generate:controller \
--module="modulename" \
--class="DefaultController" \
--routes='"title":"ControllerMethod", "name":"modulename.default_controller_hello", "method":"hello", "path":"/modulename/hello/{name}"' \
--test |
generate:entity:bundle 生成新内容类型(node 或实体 bundle) | drupal generate:entity:bundle \
--module="modulename" \
--bundle-name="default" \
--bundle-title="default" |
generate:entity:config 生成新配置实体 | drupal generate:entity:config \
--module="modulename" \
--entity-class="DefaultEntity" \
--entity-name="default_entity" \
--base-path="/admin/structure" \
--label="Default entity" |
generate:entity:content 生成新内容实体 | drupal generate:entity:content \
--module="modulename" \
--entity-class="DefaultEntity" \
--entity-name="default_entity" \
--base-path="/admin/structure" \
--label="Default entity" drupal generate:entity:content \
--module="modulename" \
--entity-class="DefaultEntity" \
--entity-name="default_entity" \
--base-path="/admin/structure" \
--label="Default entity" \
--is-translatable \
--revisionable |
generate:event:subscriber 生成事件订阅者 | drupal generate:event:subscriber \
--module="modulename" \
--name="modulename.default" \
--class="DefaultSubscriber" \
--events='kernel_request'
|
generate:form 生成新 "FormBase" | drupal generate:form \
--module="modulename" \
--class="DefaultForm" \
--form-id="default_form" \
--config-file \
--path="/modulename/form/default" drupal generate:form \
--module="modulename" \
--class="DefaultForm" \
--form-id="default_form" \
--config-file \
--inputs='"name":"inputname", "type":"text_format", "label":"InputName", "options":"", "description":"Just a text input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \
--inputs='"name":"email", "type":"email", "label":"Email", "options":"", "description":"Just an email input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \
--path="/modulename/form/default" |
generate:form:alter 生成 hook_form_alter() 或 hook_form_FORM_ID_alter 实现 | drupal generate:form:alter \
--module="modulename" drupal generate:form:alter \
--module="modulename" \
--inputs='"name":"inputtext", "type":"text_format", "label":"InputText", "options":"", "description":"Just an input text", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \
--inputs='"name":"email", "type":"email", "label":"Email", "options":"", "description":"Just an email input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' |
generate:form:config 生成新 "ConfigFormBase" | drupal generate:form:config \
--module="modulename" \
--class="DefaultForm" \
--form-id="default_form" \
--config-file \
--path="/modulename/form/default" drupal generate:form:config \
--module="modulename" \
--class="DefaultForm" \
--form-id="default_form" \
--config-file \
--inputs='"name":"inputname", "type":"text_format", "label":"InputName", "options":"", "description":"Just a text input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \
--inputs='"name":"email", "type":"email", "label":"Email", "options":"", "description":"Just an email input", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' \
--path="/modulename/form/default"
|
generate:help 生成 hook_help() 的一个实现 | drupal generate:help \
--module="modulename" \
--description="My Awesome Module" |
generate:jstest Generate a JavaScript test. | drupal generate:module \
--module="modulename" \
--machine-name="modulename" \
--module-path="/modules/custom" \
--description="My Awesome Module" \
--core="8.x" \
--package="Custom" \
--module-file \
--composer \
--test \
--twigtemplate
|
generate:module 生成新模块 | drupal generate:module \
--module="modulename" \
--machine-name="modulename" \
--module-path="/modules/custom" \
--description="My Awesome Module" \
--core="8.x" \
--package="Custom" \
--module-file \
--composer \
--test \
--twigtemplate |
generate:module:file 生成一个 .module 文件 | drupal generate:module:file \
--module="modulename" |
generate:permissions Generate module permissions | |
generate:plugin:block 生成区块插件 | drupal generate:plugin:block \
--module="modulename" \
--class="DefaultBlock" \
--label="Default block" \
--plugin-id="default_block" \
--theme-region="header" \
--inputs='"name":"inputtext", "type":"text_format", "label":"InputText", "options":"", "description":"Just an input text", "maxlength":"", "size":"", "default_value":"", "weight":"0", "fieldset":""' |
generate:plugin:ckeditorbutton 生成 CKEditor 按钮插件 | drupal generate:plugin:ckeditorbutton \
--module="modulename" \
--class="DefaultCKEditorButton" \
--label="Default ckeditor button" \
--plugin-id="default ckeditor button" \
--button-name="Default ckeditor button" \
--button-icon-path="modules/custom/modulename/js/plugins/default ckeditor button/images/icon.png" |
generate:plugin:condition 生成条件插件 | drupal generate:plugin:condition \
--module="modulename" \
--class="ExampleCondition" \
--label="Example condition" \
--plugin-id="example_condition" \
--context-definition-id="entity:node" \
--context-definition-label="node" \
--context-definition-required drupal generate:plugin:condition \
--module="modulename" \
--class="ExampleCondition" \
--label="Example condition" \
--plugin-id="example_condition" \
--context-definition-id="language" \
--context-definition-label="Language" \
--context-definition-required drupal generate:plugin:condition \
--module="modulename" \
--class="ExampleCondition" \
--label="Example condition" \
--plugin-id="example_condition" \
--context-definition-id="entity:user_role" \
--context-definition-label="user_role" \
--context-definition-required
|
generate:plugin:field 生成字段类型、Widget和格式化器的插件 | drupal generate:plugin:field \
--module="modulename" \
--type-class="ExampleFieldType" \
--type-label="Example field type" \
--type-plugin-id="example_field_type" \
--type-description="My Field Type" \
--formatter-class="ExampleFormatterType" \
--formatter-label="Example formatter type" \
--formatter-plugin-id="example_formatter_type" \
--widget-class="ExampleWidgetType" \
--widget-label="Example widget type" \
--widget-plugin-id="example_widget_type" \
--field-type="example_field_type" \
--default-widget="example_widget_type" \
--default-formatter="example_formatter_type"
|
generate:plugin:fieldformatter 生成字段格式化器插件 | drupal generate:plugin:fieldformatter \
--module="modulename" \
--class="ExampleFieldFormatter" \
--label="Example field formatter" \
--plugin-id="example_field_formatter" \
--field-type="text"
|
generate:plugin:fieldtype 生成字段类型插件 | drupal generate:plugin:fieldtype \
--module="modulename" \
--class="ExampleFieldType" \
--label="Example field type" \
--plugin-id="example_field_type" \
--description="My Field Type" drupal generate:plugin:fieldtype \
--module="modulename" \
--class="ExampleFieldType" \
--label="Example field type" \
--plugin-id="example_field_type" \
--description="My Field Type" \
--default-widget="DefaultWidget" \
--default-formatter="DefaultFormatter"
|
generate:plugin:fieldwidget 生成字段 Widget 插件 | drupal generate:plugin:fieldwidget \
--module="modulename" \
--class="ExampleFieldWidget" \
--label="Example field widget" \
--plugin-id="example_field_widget" \
--field-type="text"
|
generate:plugin:imageeffect 生成图像效果插件 | drupal generate:plugin:imageeffect \
--module="modulename" \
--class="DefaultImageEffect" \
--label="Default image effect" \
--plugin-id="default_image_effect" \
--description="My Image Effect"
|
generate:plugin:imageformatter 生成图像显示插件. | drupal generate:plugin:imageformatter \
--module="modulename" \
--class="ExampleImageFormatter" \
--label="Example image formatter" \
--plugin-id="example_image_formatter"
|
generate:plugin:mail 生成 mail 插件 | drupal generate:plugin:mail \
--module="modulename" \
--class="HtmlFormatterMail" \
--label="Html formatter mail" \
--plugin-id="html_formatter_mail"
|
generate:plugin:migrate:dataparser Generate a migrate data parser | drupal generate:plugin:migrate:source \
--module="modulename" \
--class="PluginClassName" \
--plugin-id="plugin_class_name" \
--plugin-title="Data parser"
|
generate:plugin:migrate:process Generate a migrate process plugin | drupal generate:plugin:migrate:process \
--module="modulename" \
--class="MigrationProcess" \
--plugin-id="migrationprocess"
|
generate:plugin:migrate:source Generate a migrate source plugin | drupal generate:plugin:migrate:source \
--module="modulename" \
--class="PluginClassName" \
--plugin-id="plugin_class_name" \
--table="DefaultTableName" \
--alias="D" drupal generate:plugin:migrate:source \
--module="modulename" \
--class="DefaultPluginClass" \
--plugin-id="default_plugin_class" \
--table="users" \
--alias="u" \
--fields='"id":"id", "description":"the user id"' \
--fields='"id":"username", "description":"the username"' \
--fields='"id":"password", "description":"the user password"' \
--fields='"id":"email", "description":"the user email"'
|
generate:plugin:queue Drupal Console Queueworker generator. | drupal generate:plugin:queue \
--module="modulename" \
--class="PluginClassName" \
--plugin-id="plugin_class_name" \
--cron-time="30" \
--label="Example QueueWorker" |
generate:plugin:rest:resource 生成 REST资源插件 | drupal generate:plugin:rest:resource \
--module="modulename" \
--class="DefaultRestResource" \
--plugin-id="default_rest_resource" \
--plugin-label="Default rest resource" \
--plugin-url="http://rest.resources.example.com" \
--plugin-states='GET'
|
generate:plugin:rules:action Generate a plugin rule action | drupal generate:plugin:rules:action \
--module="modulename" \
--class="DefaultAction" \
--label="Default Action" \
--plugin-id="default_action" \
--category="Action category" \
--context='"name":"user", "type":"entity:user", "label":"Context label", "description":"Context description"' drupal generate:plugin:rules:action \
--module="modulename" \
--class="DefaultAction" \
--label="Default Action" \
--plugin-id="default_action" \
--category="Action category" \
--context='"entity":"node", "type":"entity", "label":"Context label", "description":"Context description"'
|
generate:plugin:rules:dataprocessor Generate a plugin rule dataprocessor | drupal generate:plugin:rules:dataprocessor \
--module="modulename" \
--class="DefaultDataprocessor" \
--label="Default dataprocessor" \
--plugin-id="default_dataprocessor" \
|
generate:plugin:skeleton 为没有特定生成器的生成一个基本插件的实现 | drupal generate:plugin:skeleton \
--module="modulename" \
--plugin-id="link_relation_type" \
--class="DefaultLinkRelationType"
|
generate:plugin:type:annotation 生成一个有识别注解能力的插件类别 | drupal generate:plugin:type:annotation \
--module="modulename" \
--class="ExamplePlugin" \
--machine-name="example_plugin" \
--label="Example plugin"
|
generate:plugin:type:yaml 生成一个有识别Yaml能力的插件类别 | drupal generate:plugin:type:yaml \
--module="modulename" \
--class="ExamplePlugin" \
--plugin-name="example_plugin" \
--plugin-file-name="example.plugin"
|
generate:plugin:validationconstraint Generate a validation constraint plugin. | drupal generate:plugin:validationconstraint \
--module="modulename" \
--class="ExampleConstraint" \
--label="Example validation constraint" \
-plugin-id="example_validation_constraint" \
--hook \
--field-id="field_exmaple_id" \
--bundle="entity_example_bundle" \
--no-interaction
|
generate:plugin:views:field 生成一个定制的插件视窗域. | drupal generate:plugin:views:field \
--module="modulename" \
--class="CustomViewsField" \
--title="Custom views field" \
--description="My awesome custom views field plugin."
|
generate:post:update 生成一个 hook_post_update_NAME() 的实现 | drupal generate:post:update \
--module="modulename" \
--post-update-name="PostUpdateName"
|
generate:profile 生成一个方案. | drupal generate:profile \
--profile="NewProfileName" \
--machine-name="newprofilename" \
--description="My Useful Profile" \
--core="8.x" \
--dependencies="modulename"
|
generate:routesubscriber 生成一个路径订阅 | drupal generate:routesubscriber \
--module="modulename" \
--name="modulename.route_subscriber" \
--class="RouteSubscriber"
|
generate:service 生成服务 | drupal generate:service \
--module="modulename" \
--name="modulename.default" \
--class="DefaultService" \
--path-service="/modules/custom/modulename/src/" drupal generate:service \
--module="modulename" \
--name="modulename.default" \
--class="DefaultService" \
--interface \
--interface-name="InterfaceName" \
--path-service="/modules/custom/modulename/src/"
|
generate:site:alias Generates a site alias. | drupal generate:site:alias \
--name="demo" \
--environment="dev" \
--type="ssh" \
--composer-root="/path/to/remote/project" \
--site-uri="default" \
--host="hostName/domain" \
--user="userName" \
--port="port" \
--drupal-console-binary="drupal" \
--extra-options="-tt" \
--directory="/Users/hjuarez/drupalSq/console/" |
generate:theme 生成一个外观主题. | drupal generate:theme \
--theme="AnotherTheme" \
--machine-name="anothertheme" \
--theme-path="/themes/custom" \
--description="My Awesome theme" \
--core="8.x" \
--package="PackageName" \
--global-library="global-styling" \
--base-theme="false" drupal generate:theme \
--theme="MyTheme" \
--machine-name="mytheme" \
--theme-path="/themes/custom" \
--description="My Awesome theme" \
--core="8.x" \
--package="MyThemePackage" \
--global-library="global-styling" \
--base-theme="stable" \
--regions='"region_name":"Content", "region_machine_name":"content"' \
--regions='"region_name":"Panel", "region_machine_name":"panel"' \
--breakpoints='"breakpoint_name":"narrow", "breakpoint_label":"narrow", "breakpoint_media_query":"all and (min-width: 560px) and (max-width: 850px)", "breakpoint_weight":"1", "breakpoint_multipliers":"1x"'
|
generate:twig:extension 生成一个 Twig 扩展 | drupal generate:twig:extension \
--module="modulename" \
--name="modulename.twig.extension" \
--class="DefaultTwigExtension"
|
generate:update 生成一个 hook_update_N() 的实现 | drupal generate:update \
--module="modulename" \
--update-n="8001"
|
image:styles:flush 按图像样式执行 flush 函数或对所有图像样式执行 flush 函数 | drupal image:styles:flush large drupal image:styles:flush thumbnail
|
locale:language:add 添加一种语言 | |
locale:language:delete 删除一种语言 | |
locale:translation:status 列出可用翻译更新 | |
migrate:execute 执行可用迁移 | |
migrate:rollback 回滚一个或多个迁移 | |
migrate:setup 导入或创建数据库迁移 | |
module:dependency:install 在应用中安装依赖模块 | drupal module:dependency:install modulename
|
module:download 下载模块 | drupal module:download modulename \
--path="modules/contrib"
|
module:install 安装模块 | drupal module:install modulename
|
module:path 返回模块的相对路径(或绝对路径) | drupal module:path modulename
|
module:uninstall 卸载模块 | drupal module:uninstall modulename
|
module:update 更新核心,模块 | drupal module:update modulename \
--composer
|
multisite:new 建立一个新的多站点安装文件(s) | drupal multisite:new vendor/newsite http://mysite.example.com
|
multisite:update Update the files for a multisite installed. | drupal multisite:update
|
node:access:rebuild 创建节点访问权限. 重建会移除所有内容上的使用权限并替换为当前模块或当前设置里的权限 | drupal node:access:rebuild --batch |
queue:run 处理选中的队列 | |
quick:start Download, install and serve a new Drupal project | |
rest:disable 禁用 REST 资源 | |
rest:enable 启用 REST 资源 | |
role:delete Delete roles for the application | drupal role:delete moderator
|
role:new Create roles for the application | drupal role:new moderator moderator
|
router:rebuild 重建路由 | drupal router:rebuild |
settings:set 改变 DrupalConsole 配置文件中的配置 | drupal settings:set application.language es |
site:import:local 导入/配置一个已经存在的 Drupal 项目 | drupal site:import:local SiteName /private/var/www/vhost/anexusit/drupal8.dev/web |
site:install 安装 Drupal | drupal site:install standard \
--langcode="en" \
--db-type="mysql" \
--db-host="127.0.0.1" \
--db-name="drupal8" \
--db-user="u53rn4m3" \
--db-pass="dbp455" \
--db-port="3306" \
--site-name="Drupal 8" \
--site-mail="admin@example.com" \
--account-name="admin" \
--account-mail="admin@example.com" \
--account-pass="p455w0rd"
drupal site:install standard mysql://dbUser:dbPass@dbHost/dbName \
--langcode="en" \
--site-name="Drupal 8" \
--site-mail="admin@example.com" \
--account-name="admin" \
--account-mail="admin@example.com" \
--account-pass="p455w0rd"
|
site:maintenance 切换网站到维护模式 | drupal site:maintenance on drupal site:maintenance off
|
site:mode 转换系统性能配置 | drupal site:mode prod drupal site:mode dev
|
site:new Download a new Drupal project | |
site:statistics 显示网站的当前统计 | |
site:status 当前Drupal安装状态 | drupal site:status \
--format="table"
|
state:delete 删除状态 | drupal state:delete comment.maintain_entity_statistics
|
state:override 覆写状态键的值 | drupal state:override comment.node_comment_statistics_scale "!!float 1"
|
taxonomy:term:delete Delete taxonomy terms from a vocabulary | drupal taxonomy:term:delete tags
|
theme:download 下载主题 | drupal theme:download Alina 7.x-1.2
|
theme:install 安装主题 | drupal theme:install mytheme
|
theme:path 返回主题的相对路径 (或绝对路径) | drupal theme:path mytheme
|
theme:uninstall 卸载程序的一个或多个外观主题 | drupal theme:uninstall mytheme
|
update:entities 应用实体更新 | drupal update:entities
|
update:execute 执行的给出的某个模块的更新程序或者执行所有的更新程序 | drupal update:execute
drupal update:execute system
|
user:create Create users for the application | drupal user:create john p455w0rd \
--roles='authenticated' \
--email="john@anexusit.com" \
--status="1" drupal user:create doe p455w0rd \
--roles='administrator' \
--email="doe@anexusit.com" \
--status="1"
|
user:delete 删除网站用户(s) | drupal user:delete \
--user-id="2"
--roles='authenticated' drupal user:delete \
--user-id="3"
drupal user:delete \
--role="authenticated"
|
user:login:clear:attempts 清空一个用户的登录尝试数据。 | |
user:login:url 返回一次性登录链接. | drupal user:login:url 1
drupal user:login:url jmolivas |
user:password:hash 从文本格式密码中生成哈希码 | drupal user:password:hash p455w0rd
|
user:password:reset 为指定用户重设密码. | drupal user:password:reset 2 p455w0rd
drupal user:password:reset jmolivas p455w0rd
|
user:role 添加/移除给定用户的角色 | drupal user:role add admin administrator drupal user:role remove admin administrator
|
user:unblock Unblock a specific user. | drupal user:unblock 2 drupal user:unblock johndoe
|
views:disable 停启视图 | drupal views:disable content
drupal views:disable frontpage
|
views:enable 启用一个视图 | drupal views:enable content
drupal views:enable frontpage
|