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';
}
}