Inheritance: implements PHPCR\NodeType\ItemDefinitionInterface
Example #1
0
 /**
  * Treat more information in addition to ItemDefinition::fromArray()
  *
  * See class documentation for the fields supported in the array.
  *
  * @param array $data The node definition in array form.
  */
 protected function fromArray(array $data)
 {
     parent::fromArray($data);
     $this->allowsSameNameSiblings = $data['allowsSameNameSiblings'];
     $this->defaultPrimaryTypeName = isset($data['defaultPrimaryTypeName']) ? $data['defaultPrimaryTypeName'] : null;
     $this->requiredPrimaryTypeNames = isset($data['requiredPrimaryTypeNames']) && count($data['requiredPrimaryTypeNames']) ? $data['requiredPrimaryTypeNames'] : array(self::DEFAULT_PRIMARY_NODE);
 }
Example #2
0
 protected function fromArray(array $data)
 {
     parent::fromArray($data);
     $this->requiredType = $data['requiredType'];
     $this->isMultiple = isset($data['multiple']) ? $data['multiple'] : false;
     $this->isFullTextSearchable = isset($data['fullTextSearchable']) ? $data['fullTextSearchable'] : false;
     $this->isQueryOrderable = isset($data['queryOrderable']) ? $data['queryOrderable'] : false;
     $this->valueConstraints = isset($data['valueConstraints']) ? $data['valueConstraints'] : array();
     $this->availableQueryOperators = isset($data['availableQueryOperators']) ? $data['availableQueryOperators'] : array();
     $this->defaultValues = isset($data['defaultValues']) ? $data['defaultValues'] : array();
 }