Пример #1
0
 /**
  * @return void
  */
 public function initializeObject()
 {
     $this->mapperConfiguration->allowProperties('identifier', 'createdAt', 'lastUpdatedAt', 'title', 'subTitle', 'keywords', 'abstract', 'teaserImage');
     $this->mapperConfiguration->skipUnknownProperties();
     $this->mapperConfiguration->setMapping('_pageId', 'identifier');
     $this->mapperConfiguration->setMapping('crdate', 'createdAt');
     $this->mapperConfiguration->forProperty('createdAt')->setTypeConverterOption(DateTimeConverter::class, DateTimeConverter::CONFIGURATION_DATE_FORMAT, 'U');
     $this->mapperConfiguration->setMapping('lastUpdated', 'lastUpdatedAt');
     $this->mapperConfiguration->forProperty('lastUpdatedAt')->setTypeConverterOption(DateTimeConverter::class, DateTimeConverter::CONFIGURATION_DATE_FORMAT, 'U');
     $this->mapperConfiguration->setMapping('title', 'title');
     $this->mapperConfiguration->setMapping('subtitle', 'subTitle');
     $this->mapperConfiguration->setMapping('keywords', 'keywords');
     $this->mapperConfiguration->setMapping('abstract', 'abstract');
     $this->mapperConfiguration->setMapping('_teaserImage', 'teaserImage');
 }