macgyer\yii2materializecss\widgets\Chip::init PHP Method

init() public method

Initializes the widget.
public init ( )
    public function init()
    {
        parent::init();
        Html::addCssClass($this->options, ['widget' => 'chip']);
        if ($this->imageOptions && !isset($this->imageOptions['src'])) {
            throw new InvalidConfigException('The "src" attribute for the image is required.');
        }
        if ($this->renderIcon && !isset($this->icon['name'])) {
            $this->icon['name'] = 'close';
        }
    }