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

load() public method

Load formats from a xml file.
public load ( mixed $resource, string $type = null ) : array
$resource mixed The resource
$type string The resource type
return array The formats array for the given resource
    public function load($resource, $type = null)
    {
        $path = $this->getLocator()->locate($resource);
        return $this->parseXml($path);
    }

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 public function load($resource, $type = null)
 {
     @trigger_error('XmlFormatLoader10 is deprecated since version 1.4 and will be removed in 2.0. Use XmlFormatLoader11 instead.', E_USER_DEPRECATED);
     return parent::load($resource, $type);
 }