Exemple #1
0
 /**
  * the onPluginsLoaded method
  *
  * @param array   $data
  * @return mixed|void
  */
 public function onTemplateEngineRegistered($data = array())
 {
     if (ServiceLocator::hasService('Phile_Cache')) {
         $this->cache = ServiceLocator::getService('Phile_Cache');
     }
     $collections = $this->getCollections();
     foreach ($collections as $key => $value) {
         $data['data'][$key] = $value;
     }
     if (isset($this->settings['twigsimplefilters'])) {
         $this->setTwigSimpleFilters($data['engine']);
     }
     if (isset($this->settings['twigsimplefunctions'])) {
         $this->setTwigSimpleFunctions($data['engine']);
     }
 }