glue-agency / craft-image-captions
本包最新版本(4.0.2)没有可用的许可信息。
自动生成图片标题
4.0.2
2023-06-29 14:37 UTC
Requires
- php: >=8.1
- craftcms/cms: ^4.4.0
- guzzlehttp/guzzle: ^7.2.0
README
基于每个卷使用多个服务提供商自动生成图片标题。
需求
此插件需要Craft CMS 4.4.0或更高版本,以及PHP 8.1或更高版本。
安装
您可以从插件商店或使用Composer安装此插件。
从插件商店
转到项目控制面板中的插件商店,搜索“Image Captions”。然后在其模态窗口中点击“安装”按钮。
使用Composer
打开您的终端并运行以下命令
# Require the plugin through composer composer require glue-agency/craft-image-captions # Install the plugin php craft plugin/install image-captions
集成
开箱即用
添加自定义集成
通过扩展 GlueAgency\ImageCaption\integrations\AbstractIntegration
类并实现 GlueAgency\ImageCaption\integrations\IntegrationInterface
接口来创建您的自定义集成。
挂钩 register
事件。
use GlueAgency\ImageCaption\services\IntegrationService; use GlueAgency\ImageCaption\events\integrations\RegisterIntegrationsEvent; Event::on(IntegrationService::class, IntegrationService::EVENT_REGISTER, function(RegisterIntegrationsEvent $event) { $event->integrations['your-custom-integration-name'] = YourCustomIntegration::class; });