コード例 #1
0
 /**
  * Returns a page identifier collection from the given settings key
  *
  * @param string $settingKey The settings key
  *
  * @return IdentifierCollection
  */
 private function getIdentifierCollectionFromSetting($settingKey)
 {
     $collection = $this->objectManager->get(IdentifierCollection::class);
     foreach ($this->settings[$settingKey] as $pid) {
         $identifier = Identifier::fromString($pid);
         $collection->add($identifier);
     }
     return $collection;
 }
コード例 #2
0
 /**
  * Builds a Page from a TYPO3.CMS `pages` associative record array
  *
  * @param array $data
  *
  * @return Page
  *
  * @throws \InvalidArgumentException
  */
 public function createFromAssociativeArray(array $data)
 {
     $identifier = Identifier::fromString($data['uid']);
     $data['_pageId'] = $identifier;
     try {
         $data['_teaserImage'] = $this->teaserImageResourceFactory->createFromPageIdentifier($identifier);
     } catch (\InvalidArgumentException $exc) {
     }
     $page = $this->mapper->convert($data, Page::class, $this->mapperConfiguration);
     return $page;
 }