Yii2 dev digest #1 Nov'13

Nov 25, 2013, 12:42:21 PM

As I am very interested in Yii2 and spend some time to track project development process on GitHub (and try to participate a little), I decided to make small periodic digests of most interesting and valuable changes so far. Also I often catch useful hints in GitHub discussions and don't want to loose them, so will try to collect some.

Yii2 Hints

  • Need a list of Model relations ?

@cebe you could check all getters via Reflection and check whether they return an object that implements the relation interface.

  • How to create own Panels in yii2 debug Toolbar

@qiangxue This is already supported. Just configure Module::panels to plug in your own panels. Refer to existing panels on how to create a panel.

  • How to change ActiveField appearance ?

@kartik-vh

$form->field($model, 'domain_name', [
    'template' => "{label}\n".
        "<div class='input-group'>\n".
        "{input}\n".
        "<span class='input-group-addon'>.site.ru</span>\n".
        "</div>\n".
        "{error}\n".
        "{hint}"
   ]
)->textInput();
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