{"id":4944,"date":"2021-08-09T07:22:37","date_gmt":"2021-08-09T07:22:37","guid":{"rendered":"https:\/\/www.bearloga.space\/?page_id=4944"},"modified":"2021-08-09T07:22:38","modified_gmt":"2021-08-09T07:22:38","slug":"yii-makety","status":"publish","type":"page","link":"https:\/\/www.bearloga.space\/uk\/yii-makety\/","title":{"rendered":"Yii \u2014 \u043c\u0430\u043a\u0435\u0442\u044b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u041c\u0430\u043a\u0435\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u0431\u0449\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0438 \u043d\u0438\u0436\u043d\u0438\u0439 \u043a\u043e\u043b\u043e\u043d\u0442\u0438\u0442\u0443\u043b\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.&nbsp;\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u0430\u043a\u0435\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435&nbsp;<strong>views \/ layouts<\/strong>&nbsp;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u0430\u043a\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php\n   \/* @var $this \\yii\\web\\View *\/\n   \/* @var $content string *\/\n   use yii\\helpers\\Html;\n   use yii\\bootstrap\\Nav;\n   use yii\\bootstrap\\NavBar;\n   use yii\\widgets\\Breadcrumbs;\n   use app\\assets\\AppAsset;\n   AppAsset::register($this);\n?&gt;\n\n&lt;?php $this-&gt;beginPage() ?&gt;\n&lt;!DOCTYPE html&gt;\n&lt;html lang = \"&lt;?= Yii::$app-&gt;language ?&gt;\"&gt;\n   &lt;head&gt;\n      &lt;meta charset = \"&lt;?= Yii::$app-&gt;charset ?&gt;\"&gt;\n      &lt;meta name = \"viewport\" content = \"width = device-width, initial-scale = 1\"&gt;\n      &lt;?= Html::csrfMetaTags() ?&gt;\n      &lt;title&gt;&lt;?= Html::encode($this-&gt;title) ?&gt;&lt;\/title&gt;\n      &lt;?php $this-&gt;head() ?&gt;\n   &lt;\/head&gt;\n\t\n   &lt;body&gt;\n      &lt;?php $this-&gt;beginBody() ?&gt;\n         &lt;div class = \"wrap\"&gt;\n            &lt;?php\n               NavBar::begin([\n                  'brandLabel' =&gt; 'My Company',\n                  'brandUrl' =&gt; Yii::$app-&gt;homeUrl,\n                  'options' =&gt; [\n                     'class' =&gt; 'navbar-inverse navbar-fixed-top',\n                  ],\n               ]);\n\t\t\t\t\t\n               echo Nav::widget([\n                  'options' =&gt; ['class' =&gt; 'navbar-nav navbar-right'],\n                  'items' =&gt; [\n                     ['label' =&gt; 'Home', 'url' =&gt; ['\/site\/index']],\n                     ['label' =&gt; 'About', 'url' =&gt; ['\/site\/about']],\n                     ['label' =&gt; 'Contact', 'url' =&gt; ['\/site\/contact']],\n                     Yii::$app-&gt;user-&gt;isGuest ?\n                        ['label' =&gt; 'Login', 'url' =&gt; ['\/site\/login']] :\n                        [\n                           'label' =&gt; 'Logout (' . Yii::$app-&gt;user-&gt;identity-&gt;username.')',\n                           'url' =&gt; ['\/site\/logout'],\n                           'linkOptions' =&gt; ['data-method' =&gt; 'post']\n                        ],\n                  ],\n               ]);\n\t\t\t\t\t\n               NavBar::end();\n            ?&gt;\n            &lt;div class = \"container\"&gt;\n               &lt;?= Breadcrumbs::widget([\n                  'links' =&gt; isset($this-&gt;params['breadcrumbs']) ? $this&gt;params\n                     ['breadcrumbs'] : [],\n               ]) ?&gt;\n               &lt;?= $content ?&gt;\n            &lt;\/div&gt;\n\t\t\t\t\n         &lt;\/div&gt;\n\t\t\t\n         &lt;footer class = \"footer\"&gt;\n            &lt;div class = \"container\"&gt;\n               &lt;p class = \"pull-left\"&gt;\u00a9 My Company &lt;?= date('Y') ?&gt;&lt;\/p&gt;\n               &lt;p class = \"pull-right\"&gt;&lt;?= Yii::powered() ?&gt;&lt;\/p&gt;\n            &lt;\/div&gt;\n         &lt;\/footer&gt;\n\t\t\t\n      &lt;?php $this-&gt;endBody() ?&gt;\n   &lt;\/body&gt;\n&lt;\/html&gt;\n&lt;?php $this-&gt;endPage() ?&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u042d\u0442\u043e\u0442 \u043c\u0430\u043a\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u0449\u0435\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446.&nbsp;\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f&nbsp;<strong>$ content<\/strong>&nbsp;\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e.&nbsp;\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438 \u0442\u0435\u0433\u0438, \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u044b:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>head ()<\/strong>&nbsp;\u2014 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435&nbsp;<em>head<\/em>&nbsp;.&nbsp;\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c HTML-\u043a\u043e\u0434\u043e\u043c, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430.<\/li><li><strong>beginBody ()<\/strong>&nbsp;\u2014 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430&nbsp;<em>\u0442\u0435\u043b\u0430<\/em>&nbsp;.&nbsp;<strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442<\/strong>&nbsp;\u0441\u043e\u0431\u044b\u0442\u0438\u0435&nbsp;<strong>EVENT_BEGIN_BODY<\/strong>&nbsp;.&nbsp;\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c HTML-\u043a\u043e\u0434\u043e\u043c, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0442\u0435\u043b\u0430.<\/li><li><strong>endBody ()<\/strong>&nbsp;\u2014 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0446\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430&nbsp;<em>\u0442\u0435\u043b\u0430<\/em>&nbsp;.&nbsp;<strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442<\/strong>&nbsp;\u0441\u043e\u0431\u044b\u0442\u0438\u0435&nbsp;<strong>EVENT_END_BODY<\/strong>&nbsp;.&nbsp;\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c HTML-\u043a\u043e\u0434\u043e\u043c, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0442\u0435\u043b\u0430.<\/li><li><strong>beginPage ()<\/strong>&nbsp;\u2014 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u0430\u043a\u0435\u0442\u0430.&nbsp;<strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442<\/strong>&nbsp;\u0441\u043e\u0431\u044b\u0442\u0438\u0435&nbsp;<strong>EVENT_BEGIN_PAGE<\/strong>&nbsp;.<\/li><li><strong>endPage ()<\/strong>&nbsp;\u2014 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0446\u0435 \u043c\u0430\u043a\u0435\u0442\u0430.&nbsp;<strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442<\/strong>&nbsp;\u0441\u043e\u0431\u044b\u0442\u0438\u0435&nbsp;<strong>EVENT_END_PAGE<\/strong>&nbsp;.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>head ()<\/strong>&nbsp;\u2014 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435&nbsp;<em>head<\/em>&nbsp;.&nbsp;\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c HTML-\u043a\u043e\u0434\u043e\u043c, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>beginBody ()<\/strong>&nbsp;\u2014 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430&nbsp;<em>\u0442\u0435\u043b\u0430<\/em>&nbsp;.&nbsp;<strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442<\/strong>&nbsp;\u0441\u043e\u0431\u044b\u0442\u0438\u0435&nbsp;<strong>EVENT_BEGIN_BODY<\/strong>&nbsp;.&nbsp;\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c HTML-\u043a\u043e\u0434\u043e\u043c, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0442\u0435\u043b\u0430.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>endBody ()<\/strong>&nbsp;\u2014 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0446\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430&nbsp;<em>\u0442\u0435\u043b\u0430<\/em>&nbsp;.&nbsp;<strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442<\/strong>&nbsp;\u0441\u043e\u0431\u044b\u0442\u0438\u0435&nbsp;<strong>EVENT_END_BODY<\/strong>&nbsp;.&nbsp;\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c HTML-\u043a\u043e\u0434\u043e\u043c, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0442\u0435\u043b\u0430.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>beginPage ()<\/strong>&nbsp;\u2014 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u0430\u043a\u0435\u0442\u0430.&nbsp;<strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442<\/strong>&nbsp;\u0441\u043e\u0431\u044b\u0442\u0438\u0435&nbsp;<strong>EVENT_BEGIN_PAGE<\/strong>&nbsp;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>endPage ()<\/strong>&nbsp;\u2014 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0446\u0435 \u043c\u0430\u043a\u0435\u0442\u0430.&nbsp;<strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442<\/strong>&nbsp;\u0441\u043e\u0431\u044b\u0442\u0438\u0435&nbsp;<strong>EVENT_END_PAGE<\/strong>&nbsp;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0430\u043a\u0435\u0442<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 1<\/strong>&nbsp;\u2014 \u0412\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 views \/ layouts \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c&nbsp;<strong>newlayout.php<\/strong>&nbsp;\u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043a\u043e\u0434\u043e\u043c.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php\n   \/* @var $this \\yii\\web\\View *\/\n   \/* @var $content string *\/\n   use yii\\helpers\\Html;\n   use yii\\bootstrap\\Nav;\n   use yii\\bootstrap\\NavBar;\n   use yii\\widgets\\Breadcrumbs;\n   use app\\assets\\AppAsset;\n   AppAsset::register($this);\n?&gt;\n&lt;?php $this-&gt;beginPage() ?&gt;\n&lt;!DOCTYPE html&gt;\n&lt;html lang = \"&lt;?= Yii::$app-&gt;language ?&gt;\"&gt;\n   &lt;head&gt;\n      &lt;meta charset = \"&lt;?= Yii::$app-&gt;charset ?&gt;\"&gt;\n      &lt;meta name = \"viewport\" content = \"width = device-width, initial-scale = 1\"&gt;\n      &lt;? = Html::csrfMetaTags() ?&gt;\n      &lt;title&gt;&lt;? = Html::encode($this-&gt;title) ?&gt;&lt;\/title&gt;\n      &lt;?php $this-&gt;head() ?&gt;\n   &lt;\/head&gt;\n\n   &lt;body&gt;\n      &lt;?php $this-&gt;beginBody() ?&gt;\n         &lt;div class = \"wrap\"&gt; \n            &lt;div class = \"container\"&gt;\n               &lt;? = $content ?&gt;\n            &lt;\/div&gt;\n         &lt;\/div&gt;\n\t\t\t\n         &lt;footer class = \"footer\"&gt;\n            &lt;div class = \"container\"&gt;\n               &lt;p class = \"pull-left\"&gt;\u00a9 My Company &lt;?= date('Y') ?&gt;&lt;\/p&gt;\n               &lt;p class = \"pull-right\"&gt;&lt;? = Yii::powered() ?&gt;&lt;\/p&gt;\n            &lt;\/div&gt;\n         &lt;\/footer&gt;\n      &lt;?php $this-&gt;endBody() ?&gt;\n   &lt;\/body&gt;\n\t\n&lt;\/html&gt;\n&lt;?php $this-&gt;endPage() ?&gt;\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u044b \u0443\u0434\u0430\u043b\u0438\u043b\u0438 \u0432\u0435\u0440\u0445\u043d\u044e\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043c\u0435\u043d\u044e.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 2.<\/strong>&nbsp;\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0430\u043a\u0435\u0442 \u043a&nbsp;<strong>SiteController<\/strong>&nbsp;, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e&nbsp;<strong>$ layout<\/strong>&nbsp;\u0432 \u043a\u043b\u0430\u0441\u0441&nbsp;<strong>SiteController<\/strong>&nbsp;.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php\n   namespace app\\controllers;\n   use Yii;\n   use yii\\filters\\AccessControl;\n   use yii\\web\\Controller;\n   use yii\\filters\\VerbFilter;\n   use app\\models\\LoginForm;\n   use app\\models\\ContactForm;\n   class SiteController extends Controller {\n      public $layout = \u201cnewlayout\u201d;\n      \/* other methods *\/\n   }\n?&gt;\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 3<\/strong>&nbsp;\u2014 \u0422\u0435\u043f\u0435\u0440\u044c, \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0439\u0434\u0435\u0442\u0435 \u0432 \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0432 \u043b\u044e\u0431\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 SiteController, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u043c\u0430\u043a\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/coderlessons.com\/wp-content\/uploads\/2019\/07\/change_about_layout.png\" alt=\"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u041e \u043c\u0430\u043a\u0435\u0442\u0435\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 4<\/strong>&nbsp;\u2014 \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u0430\u0442\u0435\u0433\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0437\u0432\u0430\u0442\u044c&nbsp;<strong>yii \\ web \\ View :: registerMetaTag ()<\/strong>&nbsp;\u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 5<\/strong>&nbsp;\u2014 \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435&nbsp;<strong>\u00ab\u041e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435\u00bb<\/strong>&nbsp;<strong>SiteController<\/strong>&nbsp;.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php\n   \/* @var $this yii\\web\\View *\/\n   use yii\\helpers\\Html;\n   $this-&gt;title = 'About';\n   $this-&gt;params['breadcrumbs'][] = $this-&gt;title;\n   $this-&gt;registerMetaTag(['name' =&gt; 'keywords', 'content' =&gt; 'yii, developing, views,\n      meta, tags']);\n   $this-&gt;registerMetaTag(['name' =&gt; 'description', 'content' =&gt; 'This is the description\n      of this page!'], 'description');\n?&gt;\n&lt;div class=\"site-about\"&gt;\n   &lt;h1&gt;&lt;?= Html::encode($this-&gt;title) ?&gt;&lt;\/h1&gt;\n   &lt;p&gt;\n      This is the About page. You may modify the following file to customize its content:\n   &lt;\/p&gt;\n   &lt;code&gt;&lt;?= __FILE__ ?&gt;&lt;\/code&gt;\n&lt;\/div&gt;\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0434\u0432\u0430 \u043c\u0435\u0442\u0430\u0442\u0435\u0433\u0430 \u2014&nbsp;<strong>\u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong>&nbsp;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 6<\/strong>&nbsp;\u2014 \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043f\u043e&nbsp;<strong>\u0430\u0434\u0440\u0435\u0441\u0443 http: \/\/ localhost: 8080 \/ index.php? R = site \/ about,<\/strong>&nbsp;\u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043c\u0435\u0442\u0430\u0442\u0435\u0433\u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0441\u043d\u0438\u043c\u043a\u0435 \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/coderlessons.com\/wp-content\/uploads\/2019\/07\/meta_tags.png\" alt=\"\u041c\u0435\u0442\u0430-\u0442\u0435\u0433\u0438\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u2014<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>EVENT_BEGIN_BODY<\/strong>&nbsp;\u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430\u0445 \u043f\u043e \u0432\u044b\u0437\u043e\u0432\u0443&nbsp;<strong>yii \\ web \\ View :: beginBody ()<\/strong>&nbsp;.<\/li><li><strong>EVENT_END_BODY<\/strong>&nbsp;\u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u043a\u0435\u0442\u0430\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430&nbsp;<strong>yii \\ web \\ View :: endBody ()<\/strong>&nbsp;.<\/li><li><strong>EVENT_BEGIN_PAGE<\/strong>&nbsp;\u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u043a\u0435\u0442\u0430\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430&nbsp;<strong>yii \\ web \\ View :: beginPage ()<\/strong>&nbsp;.<\/li><li><strong>EVENT_END_PAGE<\/strong>&nbsp;\u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u043a\u0435\u0442\u0430\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430&nbsp;<strong>yii \\ web \\ View :: endPage ()<\/strong>&nbsp;.<\/li><li><strong>EVENT_BEFORE_RENDER<\/strong>&nbsp;\u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0444\u0430\u0439\u043b\u0430.<\/li><li><strong>EVENT_AFTER_RENDER<\/strong>&nbsp;\u2014 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0444\u0430\u0439\u043b\u0430.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>EVENT_BEGIN_BODY<\/strong>&nbsp;\u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430\u0445 \u043f\u043e \u0432\u044b\u0437\u043e\u0432\u0443&nbsp;<strong>yii \\ web \\ View :: beginBody ()<\/strong>&nbsp;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>EVENT_END_BODY<\/strong>&nbsp;\u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u043a\u0435\u0442\u0430\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430&nbsp;<strong>yii \\ web \\ View :: endBody ()<\/strong>&nbsp;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>EVENT_BEGIN_PAGE<\/strong>&nbsp;\u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u043a\u0435\u0442\u0430\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430&nbsp;<strong>yii \\ web \\ View :: beginPage ()<\/strong>&nbsp;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>EVENT_END_PAGE<\/strong>&nbsp;\u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u043a\u0435\u0442\u0430\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430&nbsp;<strong>yii \\ web \\ View :: endPage ()<\/strong>&nbsp;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>EVENT_BEFORE_RENDER<\/strong>&nbsp;\u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0444\u0430\u0439\u043b\u0430.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>EVENT_AFTER_RENDER<\/strong>&nbsp;\u2014 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0444\u0430\u0439\u043b\u0430.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u044d\u0442\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 7<\/strong>&nbsp;\u2014 \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0434\u0430\u0442\u0443 \u0438 \u0432\u0440\u0435\u043c\u044f \u0432&nbsp;<strong>\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438<\/strong>&nbsp;\u043e\u0431&nbsp;<strong>SiteController<\/strong>&nbsp;, \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public function actionAbout() {\n   \\Yii::$app-&gt;view-&gt;on(View::EVENT_BEGIN_BODY, function () {\n      echo date('m.d.Y H:i:s');\n   });\n   return $this-&gt;render('about');\n}\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 8<\/strong>&nbsp;\u2014 \u0412\u0432\u0435\u0434\u0438\u0442\u0435&nbsp;<strong>http: \/\/ localhost: 8080 \/ index.php? R = site \/ about<\/strong>&nbsp;\u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0438 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/coderlessons.com\/wp-content\/uploads\/2019\/07\/trigger_events_example.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u0412\u0430\u0436\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c View \u0431\u043e\u043b\u0435\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u043c\u0438, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u2014<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0432\u0438\u0434\u044b \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0445.<\/li><li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043c\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f \u043e\u0431\u0449\u0438\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432 HTML (\u0432\u0435\u0440\u0445\u043d\u0438\u0435 \u0438 \u043d\u0438\u0436\u043d\u0438\u0435 \u043a\u043e\u043b\u043e\u043d\u0442\u0438\u0442\u0443\u043b\u044b, \u043c\u0435\u043d\u044e \u0438 \u0442. \u0414.).<\/li><li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b.<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u041c\u0430\u043a\u0435\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u0431\u0449\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0438 \u043d\u0438\u0436\u043d\u0438\u0439 \u043a\u043e\u043b\u043e\u043d\u0442\u0438\u0442\u0443\u043b\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.&nbsp;\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u0430\u043a\u0435\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435&nbsp;views \/ layouts&nbsp;. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[156],"tags":[],"class_list":["post-4944","page","type-page","status-publish","hentry","category-yii"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages\/4944","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/comments?post=4944"}],"version-history":[{"count":1,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages\/4944\/revisions"}],"predecessor-version":[{"id":4945,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages\/4944\/revisions\/4945"}],"wp:attachment":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/media?parent=4944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/categories?post=4944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/tags?post=4944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}