/**
  * {@inheritdoc}
  */
 protected function createLayoutTranslation(LayoutInterface $layout, array $config)
 {
     /* @var $translation TwigLayoutTranslation */
     $translation = parent::createLayoutTranslation($layout, $config);
     $translation->setFile(ConfigUtil::getValue($config, 'file'));
     return $translation;
 }
 /**
  * {@inheritdoc}
  */
 public function load($name)
 {
     if (is_array($this->resources)) {
         foreach ($this->resources as $resource) {
             $config = ConfigUtil::formatConfig($resource);
             $filename = $this->kernel->locateResource($config['file']);
             $loadedConfig = Yaml::parse(file_get_contents($filename));
             $this->addLayout($this->createLayout(array_replace($loadedConfig, $config)));
         }
         $this->resources = null;
     }
     return parent::load($name);
 }