storychief/craft-cms-v3-storychief
Composer 安装命令:
composer require storychief/craft-cms-v3-storychief
包简介
Craft CMS plugin to use with Storychief
README 文档
README
Craft CMS plugin to use with StoryChief.
Requirements
| Craft CMS version | Branch |
|---|---|
| Craft CMS 5 | craft-cms-5 |
| Craft CMS 4 | craft-cms-4 |
| Craft CMS 3 | craft-cms-3 |
If you are still using Craft CMS 2.x, you can find the right plugin here.
Installation
You can install this plugin from the Plugin Store or with Composer.
From the Plugin Store
Go to the Plugin Store in your project’s Control Panel and search for “Storychief”. Then click on the “Install” button in its modal window.
With Composer
Open your terminal and run the following commands:
# go to the project directory cd /path/to/my-project.test # tell Composer to load the plugin composer require storychief/craft-cms-v3-storychief # tell Craft to install the plugin ./craft install/plugin storychief-v3
Activate
To activate the plugin you first need to set up a new Craft CMS channel on your StoryChief admin panel. As soon as you create one, it will give you an encryption key .
In your CRAFT CMS, go to your Settings/Plugins and activate your StoryChief plugin. Go to its Settings and fill the encryption key and website URL.
Save it.
Finally, back to your StoryChief CRAFT CMS channel configuration, fill up your CRAFT CMS site URL and save
:)
Events
Note: this is mostly for developers that know basic PHP and Composer Packages.
beforeEntryPublish and beforeEntryUpdate event
This allows developers to execute custom functionality before saving a new or updating an entry, to modify data of a new entry.
use storychief\storychiefv3\events\EntryPublishEvent; $this->on('beforeEntryPublish', function (EntryPublishEvent $event) { $payload = $event->payload; $settings = $event->settings; $entry = $event->entry; // Example 1: $entry->sectionId = 2; // BLog $entry->typeId = 2; // Example 2: if ($payload['data']['custom_fields']) { foreach ($payload['data']['custom_fields'] as $customField) { if ($customField['key'] === 'custom_field_name') { $entry->sectionId = $customField['value']; $entry->typeId = 2; } } } }); use storychief\storychiefv3\events\EntryUpdateEvent; $this->on('beforeEntryUpdate', function (EntryUpdateEvent $event) { // ... });
afterEntryPublish event
This allows developers to execute custom functionality after a new entry, pushed by Storychief, is saved in Craft.
afterEntryUpdate event
This allows developers to execute custom functionality after an update to an entry, pushed by Storychief, is saved in Craft.
Both events send out a EntrySaveEvent with the saved Entry object as its property.
Brought to you by StoryChief
storychief/craft-cms-v3-storychief 适用场景与选型建议
storychief/craft-cms-v3-storychief 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.47k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2019 年 05 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cms」 「Craft」 「craftcms」 「craft-plugin」 「storychief v3」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 storychief/craft-cms-v3-storychief 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 storychief/craft-cms-v3-storychief 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 storychief/craft-cms-v3-storychief 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Expand, collapse, change the status of, or delete multiple blocks in a Matrix field simultaneously.
GraphQL authentication for your headless Craft CMS applications.
Set Links with a specific language parameter
Supercharged text field validation.
Integrate with Snipcart.
Restrict user registration by domain in Craft CMS, allows you to limit who can register for your site based on their email address.
统计信息
- 总下载量: 1.47k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-05-21