Sulu\Bundle\MediaBundle\Media\FormatLoader\BaseXmlFormatLoader::addFormatFromFormatNode PHP Method

addFormatFromFormatNode() private method

For a given format node and a given array of formats, this method parses the format node to an array and adds it to the formats array.
private addFormatFromFormatNode ( DOMNode $formatNode, &$formats )
$formatNode DOMNode
$formats
    private function addFormatFromFormatNode(\DOMNode $formatNode, &$formats)
    {
        $key = $this->getKeyFromFormatNode($formatNode);
        $internal = $this->getInternalFlagFromFormatNode($formatNode);
        $meta = $this->getMetaFromFormatNode($formatNode);
        $scale = $this->getScaleFromFormatNode($formatNode);
        $transformations = $this->getTransformationsFromFormatNode($formatNode);
        $options = $this->getOptionsFromFormatNode($formatNode);
        $formats[$key] = ['key' => $key, 'internal' => $internal, 'meta' => $meta, 'scale' => $scale, 'transformations' => $transformations, 'options' => array_merge($this->globalOptions, $options)];
    }