getProperties() public method

returns an array of properties.
public getProperties ( boolean $flatten = false ) : Sulu\Component\Content\Compat\PropertyInterface[]
$flatten boolean
return Sulu\Component\Content\Compat\PropertyInterface[]
Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function load(NodeInterface $node, $webspaceKey, $languageCode)
 {
     $data = [];
     foreach ($this->excerptStructure->getProperties() as $property) {
         $contentType = $this->contentTypeManager->get($property->getContentTypeName());
         $contentType->read($node, new TranslatedProperty($property, $languageCode, $this->languageNamespace, $this->additionalPrefix), $webspaceKey, $languageCode, null);
         $data[$property->getName()] = $property->getValue();
     }
     return $data;
 }
Ejemplo n.º 2
0
 public function updateResponse(Response $response, StructureInterface $structure)
 {
     $tags = [$this->getBanKey($structure->getUuid())];
     foreach ($structure->getProperties(true) as $property) {
         foreach ($this->getReferencedUuids($property) as $uuid) {
             $tags[] = $this->getBanKey($uuid);
         }
     }
     $response->headers->set(self::TAGS_HEADER, implode(',', $tags));
 }
Ejemplo n.º 3
0
 /**
  * {@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;
 }