__construct() public method

### Settings - templates Either a filename to a config containing templates. Or an array of templates to load. See Cake\View\StringTemplate for template formatting. ### Customizing tag sets Using the templates option you can redefine the tag HtmlHelper will use.
public __construct ( Cake\View\View $View, array $config = [] )
$View Cake\View\View The View this helper is being attached to.
$config array Configuration settings for the helper.
 public function __construct(\Cake\View\View $view, array $config = [])
 {
     if (isset($config['useFontAwesome'])) {
         $this->_useFontAwesome = $config['useFontAwesome'];
     }
     parent::__construct($view, $config);
 }
Ejemplo n.º 2
0
 /**
  * Helper constructor.
  *
  * @param View $View
  * @param array $config
  */
 public function __construct(View $View, array $config = [])
 {
     $this->_defaultConfig['templates']['icon'] = '<i class="{{class}}"{{attrs}}></i>';
     $this->_btnPrefix = Configure::read('Html.btnPrefix');
     $this->_iconPrefix = Configure::read('Html.iconPrefix');
     parent::__construct($View, $config);
 }
Ejemplo n.º 3
0
 public function __construct(View $View, array $config = array())
 {
     $this->_defaultConfig['jquery_variable'] = '$';
     $this->_defaultConfig['jquery_js'] = 'Alaxos.jquery/jquery-1.11.1.min';
     $this->_defaultConfig['alaxos_js'] = 'Alaxos.alaxos/alaxos';
     $this->_defaultConfig['alaxos_encode'] = 'Alaxos.alaxos/encode';
     $this->_defaultConfig['bootstrap_js'] = 'Alaxos.bootstrap/bootstrap.min';
     $this->_defaultConfig['bootstrap_datepicker_js'] = 'Alaxos.bootstrap/datepicker/bootstrap-datepicker.min';
     $this->_defaultConfig['textarea_autosize_js'] = 'Alaxos.jquery/jquery.autosize.min';
     $this->_defaultConfig['alaxos_css'] = 'Alaxos.alaxos';
     $this->_defaultConfig['bootstrap_min_css'] = 'Alaxos.bootstrap/bootstrap.min';
     $this->_defaultConfig['bootstrap_theme_css'] = 'Alaxos.bootstrap/bootstrap-theme.min';
     $this->_defaultConfig['bootstrap_datepicker_css'] = 'Alaxos.bootstrap/bootstrap-datepicker3.standalone';
     parent::__construct($View, $config);
 }
Ejemplo n.º 4
0
 /**
  * HtmlHelper constructor.
  *
  * @param View $View
  * @param array $config
  */
 public function __construct(View $View, array $config = [])
 {
     parent::__construct($View, $config);
     $this->_configWrite('templates.icon', '<i class="{{class}}"{{attrs}}></i>');
 }
Ejemplo n.º 5
0
 public function __construct(View $View, array $config = array())
 {
     $this->_defaultConfig = Hash::merge($this->_defaultConfig, $this->_emailConfig);
     parent::__construct($View, $config);
 }