Jackalope\NodeType\NodeDefinition::fromArray PHP Method

fromArray() protected method

See class documentation for the fields supported in the array.
protected fromArray ( array $data )
$data array 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);
    }