Example #1
0
 /**
  * @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();
         }
     }
 }
Example #2
0
 /**
  * @param string $entryType
  * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
  */
 public function getEntriesWithType($entryType)
 {
     return EntryRepository::create()->findByAddressAndType($this, $entryType);
 }