acquia / cohesion
网站工作室
Requires
- ext-json: *
- cweagans/composer-patches: ^1.7
- drupal/entity_reference_revisions: ^1.11
- drupal/imce: ^3.1
- drupal/jquery_ui: ^1.7
- drupal/stable: ^2.0 || ^2.1
- drupal/token: ^1.14
- drush/drush: ^11.6 || ^12 || ^13
Requires (Dev)
- acquia/coding-standards: ^3.0
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- drupal/core-dev: ^10 || ^11
- e0ipso/shaper: ^1.2
Suggests
- drupal/admin_toolbar: Provides a better UX for the standard admin toolbar
- drupal/context: Provides a UI for contexts.
- drupal/google_analytics: Provides integration with Google Analytics
- drupal/menu_item_extras: Make the Menu Link Content entity fully fieldable.
- drupal/menu_link_attributes: This module allows you to add attributes to your menu links or their wrapping <li> elements.
- drupal/node_revision_delete: Provides tools to help manage node revisions and keep your database to a reasonable size.
- drupal/request_data_conditions: Defines a set of conditions via the Drupal 8 Conditions Plugin API for use with the context module
- drupal/search_api: Provides a framework for easily creating searches on any entity known to Drupal, using any kind of search engine.
- drupal/views_infinite_scroll: Provides infinite scroll functionality to Views
- drupal/webform: This module allows you to use webforms.
- dev-master
- 8.1.x-dev
- 8.0.x-dev
- 8.0.0
- 8.0.0-beta4
- 8.0.0-beta3
- 8.0.0-beta2
- 8.0.0-beta1
- 7.5.x-dev
- 7.5.2
- 7.5.1
- 7.5.1-beta1
- 7.5.0
- 7.5.0-beta2
- 7.5.0-beta1
- 7.4.x-dev
- 7.4.3
- 7.4.2
- 7.4.1
- 7.4.0
- 7.4.0-beta3
- 7.4.0-beta2
- 7.4.0-beta1
- 7.3.x-dev
- 7.3.2
- 7.3.1
- 7.3.0
- 7.2.x-dev
- 7.2.3
- 7.2.2
- 7.2.1
- 7.2.0
- 7.1.x-dev
- 7.1.2
- 7.1.1
- 7.1.0
- 7.0.x-dev
- 7.0.5
- 7.0.4
- 7.0.3
- 7.0.2
- 7.0.1
- 7.0.0
- 6.9.x-dev
- 6.9.5
- 6.9.4
- 6.9.3
- 6.9.2
- 6.9.1
- 6.9.0
- 6.8.x-dev
- 6.8.2
- 6.8.1
- 6.8.0
- 6.7.x-dev
- 6.7.0
- 6.6.x-dev
- 6.6.1
- 6.6.0
- 6.5.x-dev
- 6.5.1
- 6.5.0
- 6.4.x-dev
- 6.4.3
- 6.4.2
- 6.4.1
- 6.4.0
- 6.3.x-dev
- 6.3.5
- 6.3.4
- 6.3.3
- 6.3.2
- 6.3.1
- 6.3.0
- 6.2.x-dev
- 6.2.1
- 6.2.0
- 6.1.x-dev
- 6.1.4
- 6.1.3
- 6.1.2
- 6.1.1
- 6.1.0
- 6.0.x-dev
- 6.0.3
- 6.0.2
- 6.0.1
- 6.0.0
- dev-8.0.x-rc
- dev-feature-aco-2515
- dev-develop
- dev-DIT-445-add-gitignore-gitattributes-files
This package is auto-updated.
Last update: 2024-09-19 13:09:50 UTC
README
使用composer安装
使用composer是管理模块和主题的首选方式,因为composer可以自动处理依赖关系,从而减少出错的机会。您可以在以下位置了解更多关于composer及其安装信息:https://getcomposer.org.cn/。不推荐手动编辑composer.json文件。
打开终端,切换到项目根目录。
运行以下命令以安装模块和最小主题
composer require acquia/cohesion
composer require acquia/cohesion-theme
网站工作室将安装来自drupal.org的几个模块依赖项。
现在您可以使用以下命令通过drush启用模块
drush cr
drush pm-enable cohesion cohesion_base_styles cohesion_custom_styles cohesion_elements cohesion_style_helpers cohesion_sync cohesion_templates cohesion_website_settings sitestudio_page_builder -y
升级网站工作室
在升级到网站工作室的新版本时,需要按照以下顺序运行以下一系列命令
drush cr
drush updb -y
drush cohesion:import
drush cohesion:rebuild
Drush集成
cohesion
drush命令具有以下操作
cohesion:rebuild
重新保存并运行所有网站工作室配置实体的挂起更新。
drush cohesion:rebuild
cohesion:import
导入资产并重建元素样式(替代CRON)。
drush cohesion:import
钩子
提供了一些钩子,并在./cohesion.api.php中进行文档说明。
所有钩子都在sitestudio
组中,因此您可以在模块根目录下的MODULE.sitestudio.inc文件中实现它们。
注意:为了向后兼容,之前的dx8
组也包括在内。
全局$settings选项
显示用于调试的JSON字段
$settings['dx8_json_fields'] = TRUE;
允许在账户设置页面上编辑API URL字段
$settings['dx8_editable_api_url'] = TRUE;
在账户设置页面上公开版本号字段(用于开发)
$settings['dx8_editable_version_number'] = TRUE;
不在账户设置页面上显示API密钥字段
$settings['dx8_no_api_keys'] = TRUE;
不显示Google API密钥页面
$settings['dx8_no_google_keys'] = TRUE;
设置cohesion应使用的临时流包装器
$settings['coh_temporary_stream_wrapper'] = 'mytemp://';
在重建操作期间将数据库用作临时目录
$settings['stylesheet_json_storage_keyvalue'] = TRUE;
设置网站工作室应使用的同步目录
$settings['site_studio_sync'] = '../config/sync';
在批处理过程中设置通过同步导入的实体最大数量
$settings['sync_max_entity'] = 10;
在重建批处理过程中设置一次重建的实体最大数量
$settings['rebuild_max_entity'] = 10;
全局$config选项
设置API密钥
$config['cohesion.settings']['api_key'] = 'api-key';
设置组织密钥
$config['cohesion.settings']['organization_key'] = 'org-key';
在UI中显示旧版同步选项
$config['cohesion.settings']['sync_legacy_visibility'] = TRUE;
网站工作室事件
当发生某些网站工作室操作时,将触发事件,以便您可以与之交互,但您必须编写自己的事件订阅者来订阅相关事件。主要网站工作室模块的事件可以在\Drupal\cohesion\SiteStudioEvents
类中找到。
预网站工作室重建
当开始网站工作室重建操作时,将发送PreRebuildEvent。
订阅:Drupal\cohesion\SiteStudioEvents::PRE_REBUILD
发送的事件是Drupal\cohesion\Event\PreRebuildEvent
。
后网站工作室重建
当网站工作室重建操作完成时,将发送PostRebuildEvent。
订阅:Drupal\cohesion\SiteStudioEvents::POST_REBUILD
发送的事件是Drupal\cohesion\Event\PostRebuildEvent
。
测试
运行类似以下命令:vendor/bin/phpunit -c docroot/core/phpunit.xml.dist --testsuite=unit --group Cohesion
许可证
版权(C)2024 Acquia,Inc。
本程序是免费软件:您可以按照自由软件基金会发布的GNU通用公共许可证版本2的条款重新分发和/或修改它。
本程序以希望它会有用而分发,但没有任何保证;甚至没有关于适销性或特定用途适用性的暗示性保证。有关更多信息,请参阅GNU通用公共许可证。