getCreated() public method

return created datetime.
public getCreated ( ) : DateTime
return DateTime
コード例 #1
0
ファイル: StructureResolver.php プロジェクト: kriswillis/sulu
 /**
  * {@inheritDoc}
  */
 public function resolve(StructureInterface $structure)
 {
     $data = ['view' => [], 'content' => [], 'uuid' => $structure->getUuid(), 'creator' => $structure->getCreator(), 'changer' => $structure->getChanger(), 'created' => $structure->getCreated(), 'changed' => $structure->getChanged(), 'template' => $structure->getKey(), 'path' => $structure->getPath()];
     if ($structure instanceof PageBridge) {
         $data['extension'] = $structure->getExt()->toArray();
         $data['urls'] = $structure->getUrls();
         $data['published'] = $structure->getPublished();
         $data['shadowBaseLocale'] = $structure->getShadowBaseLanguage();
         foreach ($data['extension'] as $name => $value) {
             $extension = $this->structureManager->getExtension($structure->getKey(), $name);
             $data['extension'][$name] = $extension->getContentData($value);
         }
     }
     foreach ($structure->getProperties(true) as $property) {
         $contentType = $this->contentTypeManager->get($property->getContentTypeName());
         $data['view'][$property->getName()] = $contentType->getViewData($property);
         $data['content'][$property->getName()] = $contentType->getContentData($property);
     }
     return $data;
 }
コード例 #2
0
ファイル: Structure.php プロジェクト: sulu/sulu
 /**
  * {@inheritdoc}
  */
 public function copyFrom(StructureInterface $structure)
 {
     $this->setWebspaceKey($structure->getWebspaceKey());
     $this->setLanguageCode($structure->getLanguageCode());
     $this->setUuid($structure->getUuid());
     $this->setChanged($structure->getChanged());
     $this->setChanger($structure->getChanger());
     $this->setCreated($structure->getCreated());
     $this->setCreator($structure->getCreator());
     $this->setPublished($structure->getPublished());
     $this->setPath($structure->getPath());
     $this->setNodeType($structure->getNodeType());
     $this->setHasTranslation($structure->getHasTranslation());
 }