numero2 / contao-perview-bundle
将 Perview 的工作广告导入 Contao 作为新闻
1.0.1
2024-04-23 13:23 UTC
Requires
- contao/core-bundle: ^4.13
- contao/news-bundle: ^4.13
Requires (Dev)
- contao/manager-plugin: ^2.0
Conflicts
- contao/core: *
- contao/manager-plugin: <2.0 || >=3.0
This package is auto-updated.
Last update: 2024-09-23 14:37:58 UTC
README
关于
将来自 perview® 的工作广告作为新闻导入 Contao。
系统要求
- Contao 4.13 (或更高版本)
安装
- 通过 Contao Manager 或 Composer 安装 (
composer require numero2/contao-perview-bundle
) - 通过 Contao-Installtool 或使用 contao:migrate 命令运行数据库更新。
钩子
默认情况下,该组件仅从 perview® 工作广告中导入某些信息。如果您需要更多元数据,您可以使用 parsePerviewPosition
钩子自行导入。
// src/EventListener/ParsePerviewPositionListener.php namespace App\EventListener; use Contao\CoreBundle\ServiceAnnotation\Hook; use Contao\NewsModel; /** * @Hook("parsePerviewPosition") */ class ParsePerviewPositionListener { public function __invoke(NewsModel $news, object $position, bool $isUpdate): void { $news->something = $position->something; } }