|
|
@ -12,6 +12,7 @@ use yii\helpers\FileHelper; |
|
|
|
use yii\helpers\Html; |
|
|
|
use yii\helpers\Html; |
|
|
|
use yii\web\JqueryAsset; |
|
|
|
use yii\web\JqueryAsset; |
|
|
|
use yii\web\AssetBundle; |
|
|
|
use yii\web\AssetBundle; |
|
|
|
|
|
|
|
use yii\web\Request; |
|
|
|
use yii\widgets\Block; |
|
|
|
use yii\widgets\Block; |
|
|
|
use yii\widgets\ContentDecorator; |
|
|
|
use yii\widgets\ContentDecorator; |
|
|
|
use yii\widgets\FragmentCache; |
|
|
|
use yii\widgets\FragmentCache; |
|
|
@ -708,6 +709,13 @@ class View extends Component |
|
|
|
if (!empty($this->metaTags)) { |
|
|
|
if (!empty($this->metaTags)) { |
|
|
|
$lines[] = implode("\n", $this->metaTags); |
|
|
|
$lines[] = implode("\n", $this->metaTags); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$request = Yii::$app->getRequest(); |
|
|
|
|
|
|
|
if ($request instanceof Request && $request->enableCsrfValidation) { |
|
|
|
|
|
|
|
$lines[] = Html::tag('meta', '', array('name' => 'csrf-var', 'content' => $request->csrfVar)); |
|
|
|
|
|
|
|
$lines[] = Html::tag('meta', '', array('name' => 'csrf-token', 'content' => $request->getCsrfToken())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($this->linkTags)) { |
|
|
|
if (!empty($this->linkTags)) { |
|
|
|
$lines[] = implode("\n", $this->linkTags); |
|
|
|
$lines[] = implode("\n", $this->linkTags); |
|
|
|
} |
|
|
|
} |
|
|
|