mirror of
https://github.com/SkillDisplay/TYPO3ContentElements.git
synced 2024-11-24 20:06:10 +01:00
9f43ea427b
To avoid name clashes we use a more precise extension key. Also the namespace is adjusted accordingly. Resolves: #8
28 lines
667 B
PHP
28 lines
667 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace SkillDisplay\SkilldisplayContent;
|
|
|
|
use SkillDisplay\PHPToolKit\Api\Campaigns;
|
|
use SkillDisplay\PHPToolKit\Entity\Campaign;
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
|
|
class TcaEnhancer
|
|
{
|
|
public function getCampaignsForTCA(array $params): void
|
|
{
|
|
$params['items'] = [
|
|
['', 0],
|
|
];
|
|
|
|
$campaigns = GeneralUtility::makeInstance(Campaigns::class)->getForUser();
|
|
/** @var Campaign $campaign */
|
|
foreach ($campaigns as $campaign) {
|
|
$params['items'][] = [
|
|
$campaign->getTitle(),
|
|
$campaign->getId(),
|
|
];
|
|
}
|
|
}
|
|
}
|