mirror of
https://github.com/SkillDisplay/TYPO3ContentElements.git
synced 2024-11-23 19:56:08 +01:00
parent
c5b2a0eec9
commit
8e46c143ce
1 changed files with 11 additions and 9 deletions
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||||
namespace SkillDisplay\SkilldisplayContent;
|
namespace SkillDisplay\SkilldisplayContent;
|
||||||
|
|
||||||
use SkillDisplay\PHPToolKit\Entity\Campaign;
|
use SkillDisplay\PHPToolKit\Entity\Campaign;
|
||||||
|
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
||||||
|
|
||||||
class TcaEnhancer
|
class TcaEnhancer
|
||||||
{
|
{
|
||||||
|
@ -25,15 +26,16 @@ class TcaEnhancer
|
||||||
['', 0],
|
['', 0],
|
||||||
];
|
];
|
||||||
|
|
||||||
$campaigns = $this->campaignsFactory
|
$pid = BackendUtility::getTSconfig_pidValue('tt_content', $params['row']['uid'], $params['row']['pid']);
|
||||||
->createFromPageUid($params['row']['pid'])
|
if ($pid > 0) {
|
||||||
->getForUser();
|
$campaigns = $this->campaignsFactory->createFromPageUid($pid)->getForUser();
|
||||||
/** @var Campaign $campaign */
|
/** @var Campaign $campaign */
|
||||||
foreach ($campaigns as $campaign) {
|
foreach ($campaigns as $campaign) {
|
||||||
$params['items'][] = [
|
$params['items'][] = [
|
||||||
$campaign->getTitle(),
|
$campaign->getTitle(),
|
||||||
$campaign->getId(),
|
$campaign->getId(),
|
||||||
];
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue