Neos\FluidAdaptor\Service\XsdGenerator::addAttributes PHP Метод

addAttributes() защищенный Метод

Initializes the view helper and its arguments, and then reads out the list of arguments.
protected addAttributes ( string $className, SimpleXMLElement $xsdElement ) : void
$className string Class name where to add the attribute descriptions
$xsdElement SimpleXMLElement XML element to add the attributes to.
Результат void
    protected function addAttributes($className, \SimpleXMLElement $xsdElement)
    {
        $viewHelper = $this->objectManager->get($className);
        $argumentDefinitions = $viewHelper->prepareArguments();
        /** @var $argumentDefinition ArgumentDefinition */
        foreach ($argumentDefinitions as $argumentDefinition) {
            $xsdAttribute = $xsdElement->addChild('xsd:attribute');
            $xsdAttribute['type'] = 'xsd:string';
            $xsdAttribute['name'] = $argumentDefinition->getName();
            $this->addDocumentation($argumentDefinition->getDescription(), $xsdAttribute);
            if ($argumentDefinition->isRequired()) {
                $xsdAttribute['use'] = 'required';
            }
        }
    }