Sulu\Component\Content\Document\Structure\Structure::getProperty PHP Method

getProperty() public method

public getProperty ( $name )
    public function getProperty($name)
    {
        if (isset($this->properties[$name])) {
            return $this->properties[$name];
        }
        $property = new PropertyValue($name);
        $this->properties[$name] = $property;
        return $property;
    }

Usage Example

Example #1
0
 /**
  * @param JsonSerializationVisitor $visitor
  * @param NodeInterface            $nodeInterface
  * @param array                    $type
  * @param Context                  $context
  */
 public function doDeserialize(JsonDeserializationVisitor $visitor, array $data, array $type, Context $context)
 {
     $container = new Structure();
     foreach ($data as $key => $value) {
         $container->getProperty($key)->setValue($value);
     }
     return $container;
 }
All Usage Examples Of Sulu\Component\Content\Document\Structure\Structure::getProperty