Exemplo n.º 1
0
 public function __construct(View $View, array $config = [])
 {
     $defaults = (array) Configure::read('Format') + $this->_defaults;
     $config += $defaults;
     $config['fontIcons'] = (array) $config['fontIcons'] + $this->_defaultIcons;
     $this->template = new StringTemplate($config['templates']);
     parent::__construct($View, $config);
 }
Exemplo n.º 2
0
 /**
  * Constructor
  *
  * ### Settings:
  *
  * - `engine` Class name to use to replace Text 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, array $config = [])
 {
     $config = Hash::merge(['engine' => 'Tools.Text'], $config);
     parent::__construct($View, $config);
 }