Пример #1
0
 public function init()
 {
     parent::init();
     if (!$this->combo instanceof Combo) {
         $this->combo = ArrayHelper::merge(['model' => $this->model, 'attribute' => $this->attribute], $this->combo);
         $this->combo = Yii::createObject($this->combo);
     }
     $this->combo->registerClientConfig();
     $this->pluginOptions = ArrayHelper::merge(['type' => 'combo', 'placement' => 'bottom', 'combo' => $this->combo->getPluginOptions(), 'hash' => $this->combo->configId], $this->pluginOptions);
     $this->registerAssets();
 }
Пример #2
0
 /** {@inheritdoc} */
 public function getFilter()
 {
     return ArrayHelper::merge(parent::getFilter(), ['type_in' => ['format' => $this->clientType], 'order' => ['format' => ['loginlike' => 'desc']], 'limit' => ['format' => '50']]);
 }
 public function getPluginOptions($options = [])
 {
     return parent::getPluginOptions(['select2Options' => ['minimumResultsForSearch' => -1]]);
 }
Пример #4
0
 /** {@inheritdoc} */
 public function getFilter()
 {
     return ArrayHelper::merge(parent::getFilter(), ['class' => ['format' => $this->profileClass]]);
 }
Пример #5
0
 /** {@inheritdoc} */
 public function getFilter()
 {
     return ArrayHelper::merge(parent::getFilter(), ['select' => ['format' => 'min']]);
 }
Пример #6
0
 public function getPluginOptions($options = [])
 {
     $options = parent::getPluginOptions();
     unset($options['select2Options']['ajax']);
     return ArrayHelper::merge($options, ['select2Options' => ['data' => $this->data]]);
 }
Пример #7
0
 public function getPluginOptions($options = [])
 {
     $options = parent::getPluginOptions();
     unset($options['select2Options']['ajax']);
     return $options;
 }