Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function warmUp($cacheDir)
 {
     $iterator = new ResourceIterator($this->resources);
     foreach ($iterator as $file) {
         $this->loader->load($file);
     }
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function loadLayoutUpdates(ContextInterface $context)
 {
     $updates = [];
     if ($context->getOr('theme')) {
         $iterator = new ResourceIterator($this->findApplicableResources($context));
         foreach ($iterator as $file) {
             $update = $this->loader->load($file);
             if ($update) {
                 $this->dependencyInitializer->initialize($update);
                 $el = $update instanceof ElementDependentLayoutUpdateInterface ? $update->getElement() : 'root';
                 $updates[$el][] = $update;
             }
         }
     }
     return $updates;
 }