Esempio n. 1
1
 /**
  * @inheritdoc
  */
 public function run()
 {
     parent::run();
     $id = $this->options['id'];
     ListViewAsset::register($this->getView());
     $this->registerClientOptions($id);
     $this->registerClientEvents($id);
 }
Esempio n. 2
0
use im\base\widgets\ListView;
use im\base\widgets\ListViewAsset;
use im\search\components\query\facet\EditableFacetValueInterface;
use im\search\models\Facet;
use im\search\models\FacetValue;
use im\search\Module;
use yii\data\ActiveDataProvider;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;
use yii\widgets\Pjax;
/* @var $this yii\web\View */
/* @var $model Facet */
/* @var $form yii\widgets\ActiveForm */
ListViewAsset::register($this);
?>

<?php 
Pjax::begin(['id' => 'facet-form-cont']);
?>

<div class="facet-form">

    <?php 
$form = ActiveForm::begin(['id' => 'facet-form', 'fieldClass' => 'im\\forms\\widgets\\ActiveField']);
?>

    <?php 
if ($model->isNewRecord) {
    echo $form->field($model, 'type')->dropDownList($model::getTypesList(), ['data-field' => 'type']);