| Total Complexity | 6 | 
| Total Lines | 54 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php | ||
| 15 | abstract class Base extends Widget | ||
| 16 | { | ||
| 17 | /** @var bool */ | ||
| 18 | public $status = true; | ||
| 19 | /** @var array */ | ||
| 20 | public $containerOptions = []; | ||
| 21 | /** @var array */ | ||
| 22 | public $clientOptions = []; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * @inheritDoc | ||
| 26 | */ | ||
| 27 | public function init() | ||
| 28 |     { | ||
| 29 | parent::init(); | ||
| 30 |         if ($this->status === true) { | ||
| 31 | $this->registerAsset(); | ||
| 32 | } | ||
| 33 | $this->id = $this->id ?: $this->getId(); | ||
| 34 | ArrayHelper::setValue($this->containerOptions, 'id', $this->id); | ||
| 35 | } | ||
| 36 | |||
| 37 | /** | ||
| 38 | * Run | ||
| 39 | * | ||
| 40 | * @return string | ||
| 41 | */ | ||
| 42 | public function run() | ||
| 43 |     { | ||
| 44 |         return Html::tag('div', '', $this->containerOptions); | ||
| 45 | } | ||
| 46 | |||
| 47 | /** | ||
| 48 | * Client Options | ||
| 49 | * | ||
| 50 | * @return array | ||
| 51 | */ | ||
| 52 | public function getClientOptions() | ||
| 59 | ]; | ||
| 60 | } | ||
| 61 | |||
| 62 | /** | ||
| 63 | * Register Asset | ||
| 64 | */ | ||
| 65 | public function registerAsset() | ||
| 71 |