kokjan/vendor/2amigos/yii2-selectize-widget/src/SelectizeDropDownList.php

38 lines
795 B
PHP
Raw Normal View History

2026-02-25 06:59:34 +00:00
<?php
/**
* @link https://github.com/2amigos/yii2-selectize-widget
* @copyright Copyright (c) 2013-2017 2amigOS! Consulting Group LLC
* @license http://opensource.org/licenses/BSD-3-Clause
*/
namespace dosamigos\selectize;
use yii\helpers\Html;
/**
* SelectizeDropDownList
*
* @author 2amigos.us <hola@2amigos.us>
*/
class SelectizeDropDownList extends InputWidget
{
/**
* @var array
*/
public $items = [];
/**
* @inheritdoc
*/
public function run()
{
if ($this->hasModel()) {
echo Html::activeDropDownList($this->model, $this->attribute, $this->items, $this->options);
} else {
echo Html::dropDownList($this->name, $this->value, $this->items, $this->options);
}
parent::run();
}
}