public function getCKEditorStylesheets()
 {
     // No cached version found
     if (!$this->_ckEditorStylesheets) {
         // Get the asset url's
         $bootstrapAsset = BootstrapAsset::register(Yii::$app->view);
         $fontAwesome = FontAwesomeAsset::register(Yii::$app->view);
         // Add default css
         $css = [$bootstrapAsset->baseUrl . '/css/bootstrap.min.css', Yii::getAlias('@frontendUrl') . '/css/main.css', Yii::getAlias('@frontendUrl') . '/css/editor.css', $fontAwesome->baseUrl . '/' . $fontAwesome->css[0]];
         // Add font assets if they exist
         if (class_exists('\\frontend\\assets\\FontAsset')) {
             // Get the font asset
             $fontAsset = new FontAsset();
             // Add google fonts
             foreach ($fontAsset->css as $font) {
                 $css[] = $fontAsset->basePath . '/' . $font;
             }
         }
         $this->_ckEditorStylesheets = $css;
     }
     return $this->_ckEditorStylesheets;
 }
<?php

/* @var $this \yii\web\View */
/* @var $content string */
use yii\helpers\Html;
use app\assets\AppAsset;
use app\assets\MaterialAsset;
use kartik\icons\FontAwesomeAsset;
use yii\materialicons\AssetBundle;
//Inicialización de Assets
AssetBundle::register($this);
FontAwesomeAsset::register($this);
MaterialAsset::register($this);
AppAsset::register($this);
$this->beginPage();
?>
<!DOCTYPE html>
<html lang="<?php 
echo Yii::$app->language;
?>
">
    <head>
        <meta charset="<?php 
echo Yii::$app->charset;
?>
">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
        <?php 
echo Html::csrfMetaTags();
?>
<?php

/**
 * @var \yii\web\View $this
 * @var string $type
 * @codeCoverageIgnore
 */
use yii\helpers\Html;
use kartik\icons\Icon;
use yii\grid\GridView;
use DevGroup\ExtensionsManager\ExtensionsManager;
use DevGroup\ExtensionsManager\models\Extension;
\DevGroup\ExtensionsManager\assets\AdminBundle::register($this);
\DevGroup\DeferredTasks\assets\AdminBundle::register($this);
\kartik\icons\FontAwesomeAsset::register($this);
$sortBy = [];
$gridTpl = <<<TPL
<div class="box-body">
    {items}
</div>
<div class="box-footer">
    <div class="row ext-bottom">
        <div class="col-sm-5">
            {summary}
        </div>
        <div class="col-sm-7">
            {pager}
        </div>
    </div>
</div>
TPL;
Exemple #4
0
 /**
  * Register client assets
  */
 public function registerAssets()
 {
     $view = $this->getView();
     FontAwesomeAsset::register($view);
     NestableAsset::register($view);
     parent::registerAssets();
 }