Permalink
ec7fc2c Dec 4, 2018
1 contributor

Users who have contributed to this file

45 lines (38 sloc) 994 Bytes
<?php
/**
* @package yii2-krajee-base
* @author Kartik Visweswaran <kartikv2@gmail.com>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2018
* @version 2.0.4
*/
namespace kartik\base;
use yii\base\InvalidConfigException;
use yii\base\Widget as YiiWidget;
/**
* Base class for widgets extending [[YiiWidget]] used in Krajee extensions.
*
* @author Kartik Visweswaran <kartikv2@gmail.com>
*/
class Widget extends YiiWidget implements BootstrapInterface
{
use TranslationTrait;
use WidgetTrait;
/**
* @var array HTML attributes or other settings for widgets.
*/
public $options = [];
/**
* @inheritdoc
* @throws InvalidConfigException
*/
public function init()
{
$this->initBsVersion();
parent::init();
$this->mergeDefaultOptions();
if (empty($this->options['id'])) {
$this->options['id'] = $this->getId();
}
$this->initDestroyJs();
}
}