concrete/src/Attribute/Category/AbstractCategory.php
public function import(AttributeType $type, SimpleXMLElement $element, Package $package = null)
    {
        $key = $this->createAttributeKey();
        $loader = $this->getImportLoader();
        $loader->load($key, $element);

        $controller = $type->getController();
        $settings = $controller->importKey($element);
        if (!is_object($settings)) {
            $settings = $controller->getAttributeKeySettings();
        }

        return $this->add($type, $key, $settings, $package);
    }
public function import(AttributeType $type, SimpleXMLElement $element, Package $package = null)
    {
        $key = $this->createAttributeKey();
        $loader = $this->getImportLoader();
        $loader->load($key, $element);

        $controller = $type->getController();
        $settings = $controller->importKey($element);
        if (!is_object($settings)) {
            $settings = $controller->getAttributeKeySettings();
        }

        return $this->add($type, $key, $settings, $package);
    }
public function import ( AttributeType $ type , SimpleXMLElement $ element , Package $ package = null ) { $ key = $ this -> createAttributeKey ( ) ; $ loader = $ this -> getImportLoader ( ) ; $ loader -> load ( $ key , $ element ) ; $ controller = $ type -> getController ( ) ; $ settings = $ controller -> importKey ( $ element ) ; if ( ! is_object ( $ settings ) ) { $ settings = $ controller -> getAttributeKeySettings ( ) ; } return $ this -> add ( $ type , $ key , $ settings , $ package ) ; }
Import a new attribute key from a SimpleXMLElement instance.

@param AttributeType $type the type of the attribute key to be created
@param SimpleXMLElement $element the SimpleXMLElement instance containing the data of the attribute key to be created
@param Package|null $package the entity of the package that's creating the attribute key (if applicable)

@return \Concrete\Core\Entity\Attribute\Key\Key
Import a new attribute key from a SimpleXMLElement instance .