public function __construct(Application $app)
 {
     parent::__construct($app);
     if ($this->app['config']->getWhichEnd() == 'backend') {
         $this->app['twig.loader.filesystem']->prependPath(__DIR__ . '/twig');
     }
 }
 /**
  * construct
  */
 public function __construct(Application $app)
 {
     parent::__construct($app);
     // Functionality we're adding applies only to the backend
     if ($this->app['config']->getWhichEnd() == 'backend') {
         $this->app['htmlsnippets'] = true;
     }
 }
 public function __construct(Application $app)
 {
     parent::__construct($app);
     $this->app['config']->getFields()->addField(new GridField());
     // For Bolt 2.2
     if ($this->app['config']->getWhichEnd() == 'backend') {
         $this->app['htmlsnippets'] = true;
         $this->app['twig.loader.filesystem']->prependPath(__DIR__ . "/twig");
     }
 }
 /**
  * {@inheritdoc}
  */
 public function __construct(Application $app)
 {
     parent::__construct($app);
     $this->app['config']->getFields()->addField(new ArrayField());
     if ($this->app['config']->getWhichEnd() == 'backend') {
         $this->app['htmlsnippets'] = true;
         $this->app['twig.loader.filesystem']->prependPath(__DIR__ . "/twig");
     }
     $this->addTwigFunction('array_prototype_context', 'getPrototypeContext');
     $this->addTwigFunction('array_children_contexts', 'getChildrenContexts');
     $this->addTwigFunction('array_content_parser', 'contentParser');
     $this->app['dispatcher']->addSubscriber(new StorageListener());
 }
Example #5
0
 public function __construct(Application $app)
 {
     parent::__construct($app);
     $this->app['config']->getFields()->addField(new SEOField());
 }
Example #6
0
 public function __construct(Application $app)
 {
     parent::__construct($app);
 }
 public function getConfig($path = '', $delim = '/')
 {
     $conf = parent::getConfig();
     if ($path) {
         $segments = explode($delim, $path);
         foreach ($segments as $index) {
             if (array_key_exists($index, $conf)) {
                 $conf = $conf[$index];
             } else {
                 return false;
             }
         }
     }
     return $conf;
 }