Blame view

vendor/dmstr/yii2-adminlte-asset/web/AdminLteAsset.php 1.17 KB
e9aa73b0   andryeyev   + adminLte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  <?php
  namespace dmstr\web;
  
  use yii\base\Exception;
  use yii\web\AssetBundle;
  
  /**
   * AdminLte AssetBundle
   * @since 0.1
   */
  class AdminLteAsset extends AssetBundle
  {
      public $sourcePath = '@vendor/almasaeed2010/adminlte/dist';
      public $css = [
          'css/AdminLTE.min.css',
      ];
      public $js = [
          'js/app.min.js'
      ];
      public $depends = [
          'rmrevin\yii\fontawesome\AssetBundle',
          'yii\web\YiiAsset',
          'yii\bootstrap\BootstrapAsset',
          'yii\bootstrap\BootstrapPluginAsset',
      ];
  
      /**
       * @var string|bool Choose skin color, eg. `'skin-blue'` or set `false` to disable skin loading
       * @see https://almsaeedstudio.com/themes/AdminLTE/documentation/index.html#layout
       */
      public $skin = '_all-skins';
  
      /**
       * @inheritdoc
       */
      public function init()
      {
          // Append skin color file if specified
          if ($this->skin) {
              if (('_all-skins' !== $this->skin) && (strpos($this->skin, 'skin-') !== 0)) {
                  throw new Exception('Invalid skin specified');
              }
  
              $this->css[] = sprintf('css/skins/%s.min.css', $this->skin);
          }
  
          parent::init();
      }
  }