Yii2 dev digest #4 Dec'13 > stdout.in Ievgen Kuzminov IT blog

Yii2 dev digest #4 Dec'13

Dec 27, 2013, 1:28:31 PM

The last digest this year.
I wish all of us to dive deep in new exciting projects with Yii2 in the next year (as I am sure there will be a stable release relatively soon, according the progress ;))
Stay in touch with development process, grow your skills with it, grow faster then it !

Tips & Tricks

@cebe :

class RedactorI18NAsset extends AssetBundle
{
    public $sourcePath = '@app/assets/redactor';
    public $js = [
    ];

    public function init()
    {
        $this->js[] = 'jquery.ui.datepicker-' . Yii::$app->language . '.js';
        parent::init();
    }
}
<php $this->beginContent('@app/views/layouts/main.php'); ?>

<div class="row">
   <div class="col-md-3">
    <div class="pg-sidebar">          
      <?= $this->blocks['sidebar']; ?>

      <?= $this->blocks['toolbar']; ?>
    </div>      
  </div>
  <div class="col-md-9">
    <?= $content; ?>
  </div>
</div>
<php $this->endContent(); ?>

And in your controller, you set a new public variable: public $layout = "/main";
In your ControllerAction you can set layout by: $this->layout = "/column2";

Read previous digests

comments powered by Disqus
Ievgen
Kuzminov "iJackUA"
Web Team Lead
at MobiDev (Kharkiv, Ukraine)
Code in Ruby and Elixir, but still love PHP. Explore ES6 and Vue.js. Explore databases, use Ubuntu and MacOS, think about IT people and management

Notes


At last I have just got the difference between Dependency Injection and Service Locator (I really hope so :) ). Hallelujah ! And now it is clear what is Inversion of Control. That worth all these years in programming...



First "real" visitors on blog from search and soc nets today (not only my friends and colleagues) ! Hello Italy and Norway ! :)



Dev stack abbreviations became more and more popular (MEAN vs LAMP etc.), StrongLoop introduces BACN - stack for mobile applications.