src/View/Helper/HtmlHelper.php
public function icon($icon, array $options = []) {
        $options += [
            'templateVars' => []
        ];
        return $this->formatTemplate('icon', [
            'type' => $icon,
            'attrs' => $this->templater()->formatAttributes($options),
            'templateVars' => $options['templateVars']
        ]);
    }
public function icon($icon, array $options = []) {
        $options += [
            'templateVars' => []
        ];
        return $this->formatTemplate('icon', [
            'type' => $icon,
            'attrs' => $this->templater()->formatAttributes($options),
            'templateVars' => $options['templateVars']
        ]);
    }
public function icon ( $ icon , array $ options = [ ] ) { $ options += [ 'templateVars' => [ ] ] ; return $ this -> formatTemplate ( 'icon' , [ 'type' => $ icon , 'attrs' => $ this -> templater ( ) -> formatAttributes ( $ options ) , 'templateVars' => $ options [ 'templateVars' ] ] ) ; }
Create an icon using the template `icon`.

### Options

- `templateVars` Provide template variables for the `icon` template.
- Other attributes will be assigned to the wrapper element.

@param string $icon Name of the icon.
@param array $options Array of options. See above.

@return string The HTML icon.
Create an icon using the template icon .