Cake\View\Helper\HtmlHelper::__construct PHP Метод

__construct() публичный Метод

### 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(View $View, array $config = [])
    {
        parent::__construct($View, $config);
        $this->response = $this->_View->response ?: new Response();
    }

Usage Example

 public function __construct(\Cake\View\View $view, array $config = [])
 {
     if (isset($config['useFontAwesome'])) {
         $this->_useFontAwesome = $config['useFontAwesome'];
     }
     parent::__construct($view, $config);
 }
All Usage Examples Of Cake\View\Helper\HtmlHelper::__construct