yii2:widgets

Виджеты / Widgets

Fields

Multi inputs

Upload / File input

select2

other

tags

tagEditor
Bootstrap Tags Input

Трансформации

Отображение и кеширование

Tree

    • $categories = Category::find()->addOrderBy('lft')->all();
      $level = 0;
       
      foreach ($categories as $n => $category)
      {
          if ($category->level == $level) {
              echo Html::endTag('li') . "\n";
          } elseif ($category->level > $level) {
              echo Html::beginTag('ul') . "\n";
          } else {
              echo Html::endTag('li') . "\n";
       
              for ($i = $level - $category->level; $i; $i--) {
                  echo Html::endTag('ul') . "\n";
                  echo Html::endTag('li') . "\n";
              }
          }
       
          echo Html::beginTag('li');
          echo Html::encode($category->title);
          $level = $category->level;
      }
       
      for ($i = $level; $i; $i--) {
          echo Html::endTag('li') . "\n";
          echo Html::endTag('ul') . "\n";
      }

Other

bootstrap-media-lightbox

fancybox

lightcase

colorbox

thickbox

photoswipe

  • yii2/widgets.txt
  • Последнее изменение: 2020/05/16 23:27
  • mirocow