/**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     if (Configure::read('Facebook.app_id')) {
         $this->loadHelper('JorgeFacebook.Facebook');
     }
 }
Esempio n. 2
0
 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     if ($this->request->action === 'add') {
         //$this->loadHelper('Tag.TagCloud');
     }
 }
Esempio n. 3
0
 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Html');
     $this->loadHelper('Form');
     $this->loadHelper('MyUtils');
 }
Esempio n. 4
0
 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     //     	$this->loadHelper('Html');
     //     	$this->loadHelper('Form');
     //     	$this->loadHelper('Flash');
 }
Esempio n. 5
0
 /**
  * Initialization hook method.
  *
  * Properties like $helpers etc. cannot be initialized statically in your custom
  * view class as they are overwritten by values from controller in constructor.
  * So this method allows you to manipulate them as required after view instance
  * is constructed.
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->_setupPaths();
     $this->_setupHelpers();
     $this->_loadAssets();
 }
Esempio n. 6
0
 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Flash');
     $this->loadHelper('Number');
     $this->loadHelper('Text');
     $this->loadHelper('Time');
 }
Esempio n. 7
0
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Admin.Menu');
     if ($this->request->action === 'edit' || $this->request->action === 'add') {
         $this->loadHelper('Form', ['templates' => 'Admin.app_form']);
     }
 }
Esempio n. 8
0
 /**
  * Initialization hook method.
  *
  * Use this method to add common initialization code like loading helpers.
  *
  * e.g. `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Html');
     $this->loadHelper('Form');
     $this->loadHelper('Paginator');
     $this->loadHelper('Url');
     $this->loadHelper('Flash');
 }
Esempio n. 9
0
 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     //        $this->loadHelper('Html', ['className' => 'BootstrapUI.Html']);
     //        $this->loadHelper('Form', ['className' => 'BootstrapUI.Form']);
     //        $this->loadHelper('Flash', ['className' => 'BootstrapUI.Flash']);
     //        $this->loadHelper('Paginator', ['className' => 'BootstrapUI.Paginator']);
     $this->eventManager()->dispatch(new Event('Spider.SpiderAppView.initialize', $this));
 }
Esempio n. 10
0
 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Bool');
     $this->loadHelper('Pretty');
     $this->loadHelper('Html', ['className' => 'BootstrapUI.Html']);
     $this->loadHelper('Form', ['className' => 'BootstrapUI.Form']);
     $this->loadHelper('Flash', ['className' => 'BootstrapUI.Flash']);
     $this->loadHelper('Paginator', ['className' => 'BootstrapUI.Paginator']);
 }
Esempio n. 11
0
 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Html', ['className' => 'BootstrapUI.Html']);
     $this->loadHelper('Form', ['className' => 'BootstrapUI.Form']);
     $this->loadHelper('Flash', ['className' => 'BootstrapUI.Flash']);
     $this->loadHelper('Paginator', ['className' => 'BootstrapUI.Paginator']);
     $this->Html->addCrumb('Home', '/');
     $this->Html->addCrumb($this->request->params['controller'], ['controller' => $this->request->params['controller'], 'action' => 'index']);
 }
Esempio n. 12
0
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Core');
     if ($this->request->params['plugin'] == 'Admin') {
         $this->loadHelper('Form', ['templates' => 'Admin.app_form', 'errorClass' => 'state-error']);
     } elseif (!isset($this->request->params['plugin'])) {
         $this->loadHelper('Form', ['templates' => 'app_form']);
     }
 }
Esempio n. 13
0
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Html');
     $this->loadHelper('Form');
     $this->loadHelper('Url');
     $this->loadHelper('Theme');
     $this->loadHelper('Paginator');
     $this->Paginator->templates(['number' => '<li class="pagination-item"><a href="{{url}}">{{text}}</a></li>', 'current' => '<li class="pagination-item active"><a href="{{url}}">{{text}}</a></li>']);
 }
Esempio n. 14
0
 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('AppUi.AppUi');
     $this->loadHelper('Form', ['templates' => 'AppUi.theme_form']);
     $this->loadHelper('Social.Activity');
     $this->loadHelper('Social.Likeable');
     $this->loadHelper('Social.Followable');
     $this->loadHelper('Social.Commentable');
     $this->loadHelper('Text');
 }
Esempio n. 15
0
 /**
  * Initialization hook method.
  *
  * Use this method to add common initialization code like loading helpers.
  *
  * e.g. `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Html', ['className' => 'AppHtml', 'App' => \Cake\Core\Configure::read('App')]);
     $this->loadHelper('Form', ['className' => 'Form', 'templates' => ['select' => '<select name="{{name}}"{{attrs}} class="form-control">{{content}}</select>', 'dateWidget' => '<ul class="list-inline"><li class="year">{{year}}</li><li class="month">{{month}}</li><li class="day">{{day}}</li></ul>', 'help' => '<p class="help-block"><i class="fa fa-info-circle"></i> {{content}}</p>']]);
     $this->loadHelper('Flash', ['className' => 'BootstrapUI.Flash', 'element' => 'Flash/default']);
     //        $this->loadHelper('Paginator', ['className' => 'BootstrapUI.Paginator']);
     $this->loadHelper('Gravatar.Gravatar');
     $this->loadHelper('Tanuck/Markdown.Markdown', ['parser' => 'GithubMarkdown']);
     $this->Paginator->templates(['sort' => '<a href="{{url}}" class="{{class}}"><span class="fa fa-fw fa-sort"></span>&nbsp;{{text}}</a>', 'sortAsc' => '<a href="{{url}}" class="{{class}}"><span class="fa fa-fw fa-sort-amount-desc"></span>&nbsp;{{text}}</a>', 'sortDesc' => '<a href="{{url}}" class="{{class}}"><span class="fa fa-fw fa-sort-amount-asc"></span>&nbsp;{{text}}</a>', 'sortAscLocked' => '<a href="{{url}}" class="{{class}}"><span class="fa fa-fw fa-sort-amount-asc"></span>&nbsp;{{text}}</a>', 'sortDescLocked' => '<a href="{{url}}" class="{{class}}"><span class="fa fa-fw fa-sort-amount-desc"></span>&nbsp;{{text}}</a>']);
 }
Esempio n. 16
0
 /**
  * 
  */
 public function initialize()
 {
     parent::initialize();
     /**
      * Use Builder Helpers
      */
     $this->loadHelper('Flash', ['className' => 'Builder.Flash']);
     /**
      * Set default layout for App using Layout/builder
      */
     if ($this->layout === 'default') {
         $this->layout('builder/default');
     }
     /**
      *  Set form templates
      */
     $_templates = ['dateWidget' => '<ul class="list-inline"><li class="year">{{year}}</li><li class="month">{{month}}</li><li class="day">{{day}}</li><li class="hour">{{hour}}</li><li class="minute">{{minute}}</li><li class="second">{{second}}</li><li class="meridian">{{meridian}}</li></ul>', 'error' => '<div class="help-block">{{content}}</div>', 'help' => '<div class="help-block">{{content}}</div>', 'inputContainer' => '<div class="form-group {{type}}{{required}}">{{content}}{{help}}</div>', 'inputContainerError' => '<div class="form-group {{type}}{{required}} has-error">{{content}}{{error}}{{help}}</div>', 'checkboxWrapper' => '<div class="checkbox"><label>{{input}}{{label}}</label></div>', 'multipleCheckboxWrapper' => '<div class="checkbox">{{label}}</div>', 'radioInlineFormGroup' => '{{label}}<div class="radio-inline-wrapper">{{input}}</div>', 'radioNestingLabel' => '<div class="radio">{{hidden}}<label{{attrs}}>{{input}}{{text}}</label></div>', 'staticControl' => '<p class="form-control-static">{{content}}</p>', 'inputGroupAddon' => '<span class="{{class}}">{{content}}</span>', 'inputGroupContainer' => '<div class="input-group">{{prepend}}{{content}}{{append}}</div>', 'input' => '<input class="form-control" type="{{type}}" name="{{name}}"{{attrs}}/>', 'textarea' => '<textarea class="form-control" name="{{name}}"{{attrs}}>{{value}}</textarea>', 'select' => '<select class="form-control" name="{{name}}"{{attrs}}>{{content}}</select>', 'selectMultiple' => '<select class="form-control" name="{{name}}[]" multiple="multiple"{{attrs}}>{{content}}</select>'];
     /**
      * 
      */
     $this->Form->templates($_templates);
     /**
      * Loader base styles using bower_components and default Builder settings
      */
     $this->start('builder-css');
     echo $this->Html->css(['/bower_components/jquery-ui/themes/smoothness/jquery-ui.min.css', '/bower_components/bootstrap/dist/css/bootstrap.min.css', '/bower_components/fontawesome/css/font-awesome.min.css', '/bower_components/datatables/media/css/dataTables.bootstrap.min.css', '/bower_components/summernote/dist/summernote.css', '/css/builder/base.css']);
     $this->end();
     /**
      * Laoder base scripts using bower_components and default Builder settings
      */
     $this->start('builder-script');
     echo $this->Html->script(['/bower_components/jquery/dist/jquery.min.js', '/bower_components/jquery-ui/jquery-ui.min.js', '/bower_components/bootstrap/dist/js/bootstrap.min.js', '/bower_components/datatables/media/js/jquery.dataTables.min.js', '/bower_components/datatables/media/js/dataTables.bootstrap.js', '/bower_components/summernote/dist/summernote.min.js', '/js/builder/base.js']);
     $this->end();
     /**
      * Load Builder default constructor element form Builder/Element/constructor
      */
     $this->prepend('builder-element', $this->element('Builder.constructor/default'));
     /**
      * If empty 'nav' block, set default navbar using Builder/Element/builder
      */
     if (!$this->fetch('nav')) {
         $this->assign('nav', $this->element('Builder.builder/navbar-fixed-top'));
     }
     /**
      * Set default title for layout using controller name
      */
     $this->assign('title', Inflector::humanize(Inflector::tableize($this->request->controller)));
 }
Esempio n. 17
0
 /**
  * Initialization hook method.
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Asset', ['className' => 'FrankFoerster/Asset.Asset']);
     $this->loadHelper('Html', ['className' => 'Wasabi/Core.Html']);
     $this->loadHelper('Menu', ['className' => 'Wasabi/Core.Menu']);
     $this->loadHelper('Guardian', ['className' => 'Wasabi/Core.Guardian']);
     $this->loadHelper('Filter', ['className' => 'FrankFoerster/Filter.Filter']);
     $this->loadHelper('Email', ['className' => 'Wasabi/Core.Email']);
     $defaultFormTemplateActions = Configure::read('defaultFormTemplateActions');
     if (is_array($defaultFormTemplateActions)) {
         $this->defaultFormTemplateActions = array_merge($this->defaultFormTemplateActions, $defaultFormTemplateActions);
     }
     if (!in_array(join('.', [$this->request->params['plugin'] ? $this->request->params['plugin'] : 'App', $this->request->params['controller'], $this->request->params['action']]), $this->defaultFormTemplateActions)) {
         $this->loadHelper('Form', ['className' => 'Wasabi/Core.Form', 'templates' => 'Wasabi/Core.form_templates', 'widgets' => ['section' => ['Wasabi\\Core\\View\\Widget\\SectionWidget'], 'info' => ['Wasabi\\Core\\View\\Widget\\InfoWidget'], 'toggleSwitch' => ['Wasabi\\Core\\View\\Widget\\ToggleSwitchWidget']]]);
     }
 }
Esempio n. 18
0
 /**
  * Initialization hook method.
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->response->type('ajax');
 }
 /**
  * Initialization hook method.
  *
  * Use this method to add common initialization code like loading helpers.
  *
  * e.g. `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Asset', ['className' => 'FrankFoerster/Asset.Asset']);
     $this->loadHelper('Filter', ['className' => 'FrankFoerster/Filter.Filter']);
 }
Esempio n. 20
0
 /**
  * Initialization hook method.
  *
  * Use this method to add common initialization code like loading helpers.
  *
  * e.g. `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Form', ['templates' => ['inputContainer' => '{{content}}']]);
 }
Esempio n. 21
0
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Dompdf.Dompdf');
 }
Esempio n. 22
0
 /**
  * Initialization hook method.
  *
  * Use this method to add common initialization code like loading helpers.
  *
  * e.g. `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Tag');
 }
 /**
  * Initializes the view with a navigation helper
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
 }
Esempio n. 24
0
 /**
  * Initialization hook method.
  *
  * Use this method to add common initialization code like loading helpers.
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Form', ['templates' => 'form-templates']);
     $this->loadHelper('Paginator', ['templates' => 'paginator-templates']);
 }
Esempio n. 25
0
 /**
  * Initialization hook method.
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->initializeUI();
 }
Esempio n. 26
0
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Form', ['widgets' => ['languages' => ['App\\View\\Widget\\LanguagesWidget', 'select', 'label']]]);
 }
Esempio n. 27
0
 /**
  * Initialization hook method.
  *
  * Use this method to add common initialization code like loading helpers.
  *
  * e.g. `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('fabioalvaro');
 }