Пример #1
0
 public function __construct(View $View, $config = array())
 {
     $config += $this->_defaultConfig;
     if ($config['fontIcons'] === true) {
         $config['fontIcons'] = (array) Configure::read('Format.fontIcons');
         if ($namespace = Configure::read('Format.iconNamespace')) {
             $config['iconNamespace'] = $namespace;
         }
     }
     $templates = array('icon' => '<i class="{{class}}" title="{{title}}" data-placement="bottom" data-toggle="tooltip"></i>') + (array) Configure::read('Format.templates');
     if (!isset($this->template)) {
         $this->template = new StringTemplate($templates);
     }
     parent::__construct($View, $config);
 }
Пример #2
0
 /**
  * Constructor
  *
  * ### Settings:
  *
  * - `engine` Class name to use to replace String functionality.
  *            The class needs to be placed in the `Utility` directory.
  *
  * @param View $View the view object the helper is attached to.
  * @param array $settings Settings array Settings array
  * @throws CakeException when the engine class could not be found.
  */
 public function __construct(View $View, $settings = [])
 {
     $settings = Hash::merge(['engine' => 'Tools.TextLib'], $settings);
     parent::__construct($View, $settings);
 }
Пример #3
0
 /**
  * Constructor
  *
  * ### Settings:
  *
  * - `engine` Class name to use to replace String functionality.
  *            The class needs to be placed in the `Utility` directory.
  *
  * @param View $View the view object the helper is attached to.
  * @param array $settings Settings array Settings array
  * @throws CakeException when the engine class could not be found.
  */
 public function __construct(View $View, $settings = array())
 {
     $settings = Hash::merge(array('engine' => 'Tools.TextLib'), $settings);
     parent::__construct($View, $settings);
 }