承接 acquia/cohesion 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

acquia/cohesion

Composer 安装命令:

composer require acquia/cohesion

包简介

Site Studio

README 文档

README

Build Status

Installation with composer

Using composer is the preferred way of managing your modules and themes as composer handles dependencies automatically and there is less margin for error. You can find out more about composer and how to install it here: https://getcomposer.org/. It is not recommended to edit your composer.json file manually.

Open up your terminal and navigate to your project root directory.

Run the following commands to require the module and minimal theme:

composer require acquia/cohesion
composer require acquia/cohesion-theme

Site Studio will install along with several module dependencies from drupal.org.

You can now enable the modules via drush with the following commands:

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

Upgrading Site Studio

When upgrading to a newer version of Site Studio, the following series of commands will need to be run in this order:

drush cr
drush updb -y
drush cohesion:import
drush cohesion:rebuild

Drush integration

The cohesion drush command has the following operations:

cohesion:rebuild

Re-save and run pending updates on all Site Studio config entities.

drush cohesion:rebuild

cohesion:import

Import assets and rebuild element styles (replacement for the CRON).

drush cohesion:import

Hooks

Several hooks are provided and documented in ./cohesion.api.php.

All hooks are in the sitestudio group, so can be implemented in a MODULE.sitestudio.inc file under your module's root if you wish.

note: the previous dx8 group is also included for backwards compatibility.

Global $settings options

Show the JSON fields for debugging:

$settings['dx8_json_fields'] = TRUE;

Allow the API URL field on the account settings page to be editable:

$settings['dx8_editable_api_url'] = TRUE;

Expose a version number field on the account settings page (for development):

$settings['dx8_editable_version_number'] = TRUE;

Don't show the API key field on the account settings page:

$settings['dx8_no_api_keys'] = TRUE;

Don't show the Google API key page:

$settings['dx8_no_google_keys'] = TRUE;

Set the temporary stream wrapper that cohesion should use:

$settings['coh_temporary_stream_wrapper'] = 'mytemp://';

Utilise the database as a scratch directory during rebuild operations:

$settings['stylesheet_json_storage_keyvalue'] = TRUE;

Set the sync directory that Site studio should use:

$settings['site_studio_sync'] = '../config/sync';

Set the max number of entities to import via sync in the batch process:

$settings['sync_max_entity'] = 10;

Set the max number of entities to rebuild at one time in the rebuild batch process:

$settings['rebuild_max_entity'] = 10;

Global $config options

Set API key:

$config['cohesion.settings']['api_key'] = 'api-key';

Set organization key:

$config['cohesion.settings']['organization_key'] = 'org-key';

Show legacy sync options in the UI:

$config['cohesion.settings']['sync_legacy_visibility'] = TRUE;

Site Studio Events

When certain Site Studio operations are taking place events are dispatched so that you can interact with it, but you must write your own event subscribers to subscribe to the relevant events. The main Site Studio module's events can be found within the \Drupal\cohesion\SiteStudioEvents class.

Pre Site Studio Rebuild

When a Site Studio rebuild operation is started the PreRebuildEvent will be dispatched.

To subscribe: Drupal\cohesion\SiteStudioEvents::PRE_REBUILD

The dispatched event is Drupal\cohesion\Event\PreRebuildEvent.

Post Site Studio Rebuild

When a Site Studio rebuild operation is complete the PostRebuildEvent will be dispatched.

To subscribe: Drupal\cohesion\SiteStudioEvents::POST_REBUILD

The dispatched event is Drupal\cohesion\Event\PostRebuildEvent.

Tests

Run something like: vendor/bin/phpunit -c docroot/core/phpunit.xml.dist --testsuite=unit --group Cohesion

License

Copyright (C) 2024 Acquia, Inc.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

acquia/cohesion 适用场景与选型建议

acquia/cohesion 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.68M 次下载、GitHub Stars 达 26, 最近一次更新时间为 2020 年 05 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 acquia/cohesion 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 acquia/cohesion 我们能提供哪些服务?
定制开发 / 二次开发

基于 acquia/cohesion 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.68M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 27
  • 点击次数: 19
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 26
  • Watchers: 14
  • Forks: 43
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2020-05-19