{"id":178303,"date":"2013-04-29T12:12:04","date_gmt":"2013-04-29T08:12:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=178303"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=178303","title":{"rendered":"<span class=\"post_title\">\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0432 Yii<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0441\u0430\u043c\u0438\u043c, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 (\u0437\u0430\u0447\u0435\u043c \u0442\u043e\u0433\u0434\u0430 \u043e\u043d \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d). \u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043f\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0443 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0435\u0442 \u043f\u0440\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u0432 Yii. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043e\u0448\u043a\u043e. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043a\u043e\u043c\u0443 \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. <\/p>\n<p>  \u0417\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0451\u0434 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043b\u0435, \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0435 \u043c\u0435\u043d\u044e \u0438 \u043a\u043d\u043e\u043f\u043a\u0430 \u0441\u043f\u0440\u0430\u0432\u0430 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043d\u0443\u0436\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/e8b\/111\/15d\/e8b11115d5981f027eb46eeedc755a5f.png\"\/> <br \/>  <a name=\"habracut\"><\/a><br \/>  <b>\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0435 \u043e\u043a\u043e\u0448\u043a\u043e \u0432\u044b\u0431\u043e\u0440\u0430: <\/b><\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/84b\/3f6\/cae\/84b3f6caec2c4e11e7265a7d82dfd4e9.png\"\/> <\/p>\n<p>  <b>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0431\u043e\u0440\u0430:<\/b><\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/c2e\/221\/a64\/c2e221a64fa312dfa03d7c94eae440f5.png\"\/><\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u043a\u043d\u043e\u043c? \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0432\u044b\u0431\u043e\u0440 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u0412 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c CGridView, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438\u0441\u043a\u0430\u0442\u044c \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0437 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<br \/>  \u0418\u0442\u0430\u043a, \u0438\u043d\u0433\u0440\u0435\u0434\u0438\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 Yii\u0448\u043d\u0438\u0446\u044b:  <\/p>\n<ul>\n<li>\u041e\u0434\u043d\u043e <a href=\"http:\/\/www.yiiframework.com\/\">Yii<\/a><\/li>\n<li>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 <a href=\"http:\/\/www.yiiframework.com\/extension\/nlsclientscript\">NLSClientScript<\/a><\/li>\n<li><a href=\"http:\/\/twitter.github.io\/bootstrap\/\">Bootstrap<\/a> \u043f\u043e \u0432\u043a\u0443\u0441\u0443 (<a href=\"http:\/\/www.yiiframework.com\/extension\/bootstrap\/\">\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f Yii<\/a>)<\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043d\u0430\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0442\u0435\u0440\u043f\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u0447\u043d\u0435\u043c \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u0435. <\/p>\n<p>  \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 <b>menuController.php<\/b>, view \u0444\u0430\u0439\u043b <b>_form.php<\/b> \u0438 \u043c\u043e\u0434\u0435\u043b\u044c <b>Menu.php<\/b>. \u041d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u043e\u043c, \u043a\u0442\u043e \u0435\u0441\u0442\u044c \u043a\u0442\u043e, \u0432\u0441\u0451 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 <a href=\"http:\/\/www.yiiframework.com\/doc\/guide\/1.1\/ru\/topics.gii\">Gii<\/a>, \u0413\u044b. <\/p>\n<h4>\u041c\u043e\u0434\u0435\u043b\u044c (Menu.php)<\/h4>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0442\u043e\u0447\u043d\u0438\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c. \u0411\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u043a\u0430 \u0438\u0437 \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 ID, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043e \u043a \u0442\u0438\u043f\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043c\u043e\u0434\u0435\u043b\u0438 (\u0442\u0430\u043a \u0436\u0435 \u0438 \u0432 \u0411\u0414) \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044f <i>type<\/i> \u0438 <i>data_id<\/i>, \u043e\u0431\u0430 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043d \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f (\u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430). \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0432 \u043f\u043e\u043b\u0435 <i>data_name<\/i>. \u041f\u0440\u043e\u0432\u0435\u0440\u043d\u0451\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u0430\u0445\u0438\u043d\u0430\u0446\u0438\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>afterFind()<\/i>. \u0422\u0430\u043a \u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u043e\u043b\u0435\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u043d\u044b\u043c. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0438\u043b\u0438 \u0436\u0435 \u0441\u0443\u0436\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0442\u0438\u043f\u043e\u0432, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0441 \u043c\u043e\u0434\u0435\u043b\u0438. <br \/>  \u0422.\u043a. \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c ActiveRecord \u0442\u043e, \u043f\u043e \u0441\u0443\u0442\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u043d\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0432\u044c\u044e\u0448\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0432\u0437\u044f\u0442\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<pre><code class=\"php\">    static $types = array(         1 =&gt; array(&quot;name&quot; =&gt; &quot;\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430&quot;,    &quot;model&quot; =&gt; &quot;Pages&quot;, &quot;view&quot; =&gt; &quot;pages_grid&quot;),         2 =&gt; array(&quot;name&quot; =&gt; &quot;\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442&quot;,    &quot;model&quot; =&gt; &quot;Docs&quot;,  &quot;view&quot; =&gt; &quot;docs_grid&quot;),         3 =&gt; array(&quot;name&quot; =&gt; &quot;\u041f\u0430\u043f\u043a\u0430&quot;,       &quot;model&quot; =&gt; &quot;Cats&quot;,  &quot;view&quot; =&gt; &quot;cats_grid&quot;),     );      public static function getSimpleTypes() { \/\/ \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432. \u041d\u0443\u0436\u0435\u043d \u0434\u043b\u044f DropDownList         $st = array();         foreach (Menu::$types as $key =&gt; $value)             $st[$key] = $value[&quot;name&quot;];         return $st;     }          var $data_name;     public function afterFind() {         $dataModel = Menu::$types[$this-&gt;type]['model']::model()-&gt;findByPk($this-&gt;data_id);         $this-&gt;data_name = $dataModel-&gt;title; \/\/ \u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 $data_name \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430         parent::afterFind();     } <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043c. <\/p>\n<h4>View \u0444\u043e\u0440\u043c\u044b (_form.php)<\/h4>\n<p>  \u0421\u043c\u043e\u0442\u0440\u0438\u043c view \u0444\u0430\u0439\u043b \u043d\u0430\u0448\u0435\u0439 \u0444\u043e\u0440\u043c\u044b _form.php<\/p>\n<pre><code class=\"php\">&lt;!-- \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443 --&gt;  &lt;?php $form=$this-&gt;beginWidget('bootstrap.widgets.TbActiveForm',array(         'id'=&gt;'menu-form',         'enableAjaxValidation'=&gt;false,         'type' =&gt; 'horizontal', )); ?&gt; &lt;!-- \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0412\u0430\u0448\u0438 \u043f\u043e\u043b\u044f \u0444\u043e\u0440\u043c\u044b --&gt;              &lt;?php echo $form-&gt;errorSummary($model);?&gt;     &lt;?php echo $form-&gt;textFieldRow($model,'name');?&gt;  &lt;!-- \u0421\u043a\u0440\u044b\u0442\u043e\u0435 \u043f\u043e\u043b\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043b\u0435\u0436\u0438\u0442 data_id --&gt;       &lt;?php echo $form-&gt;textField($model,'data_id',array('class'=&gt;'hide')); ?&gt;  &lt;!-- \u0421\u0430\u043c\u0438 \u043f\u0438\u0448\u0435\u043c \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c bootstrap--&gt;       &lt;div class=&quot;control-group&quot;&gt;         &lt;div class=&quot;control-label&quot;&gt;             &lt;?=$form-&gt;labelEx($model,'type')?&gt;         &lt;\/div&gt;         &lt;div class=&quot;controls&quot;&gt;             &lt;div class=&quot;input-append&quot;&gt;                 &lt;?php echo $form-&gt;dropDownList($model,'type',Menu::getSimpleTypes());?&gt;                 &lt;button class=&quot;btn&quot; id=&quot;data-select-btn&quot; data-loading-text=&quot;...&quot; type=&quot;button&quot;&gt;&lt;i class=&quot;icon-list&quot;&gt;&lt;\/i&gt;&lt;\/button&gt;             &lt;\/div&gt;         &lt;\/div&gt;     &lt;\/div&gt;  &lt;!-- \u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d. \u041a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f Update, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043e--&gt;               &lt;div id=&quot;data-info&quot; class=&quot;alert alert-success controls &lt;?if($model-&gt;isNewRecord):?&gt;hide&lt;?endif;?&gt;&quot;&gt;         &lt;i class=&quot;icon-file&quot;&gt;&lt;\/i&gt;         &lt;span class=&quot;info&quot;&gt;             &lt;?if(!$model-&gt;isNewRecord) echo $model-&gt;data_name?&gt;         &lt;\/span&gt;     &lt;\/div&gt;  &lt;!-- \u041a\u043d\u043e\u043f\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f\/\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f--&gt;           &lt;div class=&quot;form-actions&quot;&gt;         &lt;?php $this-&gt;widget('bootstrap.widgets.TbButton', array(                 'buttonType'=&gt;'submit',                 'type'=&gt;'primary',                 'label'=&gt;$model-&gt;isNewRecord ? 'Create' : 'Save',         )); ?&gt;     &lt;\/div&gt;  &lt;?php $this-&gt;endWidget(); ?&gt;  &lt;!-- \u041c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043e\u0448\u043a\u043e \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430--&gt;       &lt;?php $this-&gt;beginWidget('bootstrap.widgets.TbModal', array('id'=&gt;'dataModal')); ?&gt;     &lt;div class=&quot;modal-header&quot;&gt;         &lt;a class=&quot;close&quot; data-dismiss=&quot;modal&quot;&gt;&times;&lt;\/a&gt;         &lt;h4&gt;&lt;?=Yii::t(&quot;menu&quot;, &quot;\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b&quot;)?&gt;&lt;\/h4&gt;     &lt;\/div&gt;     &lt;div class=&quot;modal-body&quot;&gt;&lt;\/div&gt;     &lt;div class=&quot;modal-footer&quot;&gt;         &lt;?php $this-&gt;widget('bootstrap.widgets.TbButton', array(             'label'=&gt;Yii::t(&quot;menu&quot;, &quot;\u041e\u0442\u043c\u0435\u043d\u0430&quot;),             'url'=&gt;'#',             'htmlOptions'=&gt;array('data-dismiss'=&gt;'modal'),         )); ?&gt;     &lt;\/div&gt; &lt;?php $this-&gt;endWidget(); ?&gt;          &lt;script&gt; \/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0438\u0437 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u043e\u0448\u043a\u0430     function selectData(id, name) {         $(&quot;#Menu_data_id&quot;).val(id);         $(&quot;#data-info .info&quot;).html(name);         $(&quot;#data-info&quot;).show();         $('#dataModal').modal(&quot;hide&quot;);     }  \/\/ \u041e\u0431\u043d\u0443\u043b\u044f\u0435\u043c data_id \u0435\u0441\u043b\u0438 \u043c\u0435\u043d\u044f\u0435\u043c \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445         $('#Menu_type').change(function(){         $(&quot;#Menu_data_id&quot;).val(&quot;&quot;);         $(&quot;#data-info&quot;).hide();     })  \/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 AJAX     $('#data-select-btn').click(function(){         var buttn = this;          $(buttn).button('loading');         $.ajax({           url: &quot;&lt;?php echo $this-&gt;createAbsoluteUrl('menu\/loadData') ?&gt;&quot;,           cache: false,           data: &quot;type=&quot;+$(&quot;#Menu_type&quot;).val(),           success: function(html){             $(&quot;.modal-body&quot;).html(html);                    $(buttn).button('reset');             $('#dataModal').modal().css({                 width: 'auto',                 'margin-left': function () {                     return -($(this).width() \/ 2);                 },             });           }                    });     }) &lt;\/script&gt; <\/code><\/pre>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b \u0444\u043e\u0440\u043c\u044b. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0442\u0443\u0442, \u044d\u0442\u043e \u043d\u0430\u0448\u0435 \u043f\u043e\u043b\u0435 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f AJAX \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>  \u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u044d\u043a\u0448\u043d\u0443 <i>menu\/loadData<\/i>. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442: <\/p>\n<h4>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 (menuController.php)<\/h4>\n<p>  <\/p>\n<pre><code class=\"php\">    public function actionLoadData($type)     {         $model_name = Menu::$types[$type]['model'];          $model = new $model_name('search'); \/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430          if(isset($_GET[$model_name])) \/\/ \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u043c\u043e\u0434\u0435\u043b\u044c                 $model-&gt;attributes=$_GET[$model_name];          $this-&gt;renderPartial(Menu::$types[$type]['view'],array(                 'model'=&gt;$model,         ), false, true); \/\/ \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u043c $processOutput = true, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u043e\u0448\u043a\u0435.     } <\/code><\/pre>\n<p>  \u0421\u0442\u043e\u0438\u0442\u044c \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>renderPartial<\/i> \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <i>$processOutput = true<\/i>, \u0438\u043d\u0430\u0447\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438 \u0432 view \u0444\u0430\u0439\u043b\u0435. <br \/>  \u0415\u0449\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <i>$processOutput<\/i>, \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0438 \u0442\u0435, \u0447\u0442\u043e \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, JQuery. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 NLSClientScript, \u043e\u043d\u043e \u043f\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u043b\u0438\u0441\u044c \u0435\u0434\u0438\u043d\u043e\u0436\u0434\u044b. <\/p>\n<h4>View \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u043e\u0448\u043a\u0430 (docs_grid.php)<\/h4>\n<p>  View \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u0434\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043f\u043a\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u0442.\u0435. \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 <b>\/protected\/views\/menu<\/b><br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u0437 view \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043b\u044f \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043a\u043e\u0448\u043a\u0430. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0438\u0434 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u043e\u0434\u0435\u043b\u0438. \u041c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f <a href=\"http:\/\/www.yiiframework.com\/doc\/api\/1.1\/CGridView\">CGridView<\/a>, \u0442.\u043a. \u0432 \u043d\u0451\u043c \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435: \u043f\u043e\u0438\u0441\u043a, \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044f \u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430.<\/p>\n<pre><code class=\"php\">$this-&gt;widget('bootstrap.widgets.TbGridView',array( \t'id'=&gt;'docs-grid', \t'dataProvider'=&gt;$model-&gt;search(), \t'filter'=&gt;$model, \t'columns'=&gt;array(             'id',             'title',             'updated',             array(                 'class'=&gt;'CButtonColumn',                 'template' =&gt; &quot;{insert}&quot;,                 'buttons' =&gt; array(                     &quot;insert&quot; =&gt; array(                         'label' =&gt; &quot;\u0432\u044b\u0431\u0440\u0430\u0442\u044c&quot;,                         'options' =&gt; array(                             &quot;class&quot; =&gt; &quot;btn btn-mini btn-success&quot;,                             &quot;onclick&quot; =&gt; 'selectData($(this).parent().parent().children(&quot;:nth-child(1)&quot;).text(),$(this).parent().parent().children(&quot;:nth-child(2)&quot;).text());',                         )                     ),                 )             ), \t), )); <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e, \u043e\u0434\u0438\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0433\u0440\u0438\u0434 \u0441 \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438 \u0432\u044b\u0431\u043e\u0440\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0433\u0440\u0438\u0434 \u043e\u0442 bootstrap, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 CGridView. <br \/>  \u041d\u043e \u0442\u0443\u0442 \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u0445\u0438\u0442\u0440\u043e\u0441\u0442\u044c. \u041a\u0430\u043a \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0435 \u0432\u044b\u0431\u043e\u0440\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432\u0438\u0441\u0438\u0442 \u043d\u0435\u0432\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u0432\u044b\u0434\u0438\u0440\u0430\u044e\u0449\u0438\u0439 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <i>id<\/i> \u0438 <i>title<\/i> \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0432\u0438\u0434\u0436\u0435\u0442 GridView \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u0432\u043e\u0442 \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 <i>id<\/i> \u0438 <i>title<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>selectData<\/i>, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u0432 view \u0444\u0430\u0439\u043b\u0435 <b>_form.php<\/b>.<\/p>\n<p>  \u0412\u043e\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438 \u0432\u0441\u0451. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 <b>Menu.php<\/b> \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043b\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Gii, \u043c\u043e\u0434\u0435\u043b\u044c ActiveRecord \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0438\u043f\u0430. \t\t\t \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/178303\/\"> http:\/\/habrahabr.ru\/post\/178303\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0441\u0430\u043c\u0438\u043c, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 (\u0437\u0430\u0447\u0435\u043c \u0442\u043e\u0433\u0434\u0430 \u043e\u043d \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d). \u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043f\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0443 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0435\u0442 \u043f\u0440\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u043e-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u0432 Yii. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043e\u0448\u043a\u043e. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043a\u043e\u043c\u0443 \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. <\/p>\n<p>  \u0417\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0451\u0434 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043b\u0435, \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0435 \u043c\u0435\u043d\u044e \u0438 \u043a\u043d\u043e\u043f\u043a\u0430 \u0441\u043f\u0440\u0430\u0432\u0430 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043d\u0443\u0436\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/e8b\/111\/15d\/e8b11115d5981f027eb46eeedc755a5f.png\"\/>   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-178303","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/178303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=178303"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/178303\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=178303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=178303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=178303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}