/** * @param $parameters */ public function entityType(&$parameters) { $uid = (int) $parameters['row']['uid']; /** @var Entry $entry */ $entry = EntryRepository::create()->findByUid($uid); if (is_null($entry)) { $parameters['title'] = 'NEW'; } else { $typeConfiguration = $entry->getEntryType(); $typeKey = $typeConfiguration->getKey(); if (empty($typeKey)) { $parameters['title'] = 'NEW'; } else { $parameters['title'] = $typeConfiguration->getLabel() . ': ' . $entry->getReadableValue(); } } }
/** * @param string $entryType * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage */ public function getEntriesWithType($entryType) { return EntryRepository::create()->findByAddressAndType($this, $entryType); }