Wiki

Articles in category "tips", sorted by viewsX
Displaying 61-70 of 154 result(s).

Adding a link to a CDataColumn

Created 4 years ago by le_topTips6 comments – viewed 16,126 times – ( +3 ) – version 1.1
Backoffice Grid Views often list information like Posts for a blog while showing at the same time linked information like the User who wrote that post. For more efficiency, it is appropriate that the User is displayed as a link to the User detail page.

Yii2 default values for Index data Provider

Created 2 years ago by CTalaTips3 comments – viewed 15,924 times – ( +4 ) – version 2.0
Guys,

Auto TDD - How to auto-run PHPUnit

Created 6 years ago by imeheszTips3 comments – viewed 15,874 times – ( +3 / -1 ) – version 1.1
If you are lucky enough and have the privilege to develop on a Linux based environment, this little tip might boost-up your TDD process (at least the Unit Testing part). Please note, that this should work just fine with Apple computers also, but not tested!
tags: PHPUnit, testing, TDD

Add model validator in Controller

Created 2 years ago by Kostas Apazidis (KonApaz)Tips4 comments – viewed 15,816 times – ( +1 / -1 ) – version 1.1
There are cases that model validators should be depended by controller/action and you couldn't manipulate on the model class or using scenarios in easy way

Managing constants easily

Created 5 years ago by briiC.lvTips4 comments – viewed 15,814 times – ( +4 ) – version 1.1
For time to time i have models with constants (basicly status constants) which i use in diferent places and if these constant changes, i have to change mentions of constant in code elsewhere.

A simple action for XUpload extension

Created 5 years ago by tydeas_drTips1 comment – viewed 15,629 times – ( +3 ) – version 1.1
All the basic functionality for an action used by the xupload extension. Check resources for the source code of this action
tags: tips, xupload, caction

New Relic Error Alert with Yii

Created 3 years ago by simon604Tips2 comments – viewed 15,350 times – ( +6 ) – version 1.1
Introduction

Install specific Yii2 vendor extension & dependency without updating other packages.

Created 2 years ago by Kartik VTips0 comments – viewed 15,174 times – ( +40 / -6 ) – version 2.0
The tips here are for advanced usages of composer and its assumed you have read about using composer and have a knowledge of your vendor packages to be updated. Let's consider, you want to update only one specific yii2 vendor library, without updating all the other extension packages?

CJuiTabs Content

Created 4 years ago by mbalaTips3 comments – viewed 14,839 times – ( +6 ) – version 1.1
When I used CJuiTabs I did something. They are
tags: CJuiTabs

Using events with CAction classes

Created 5 years ago by Antonio RamirezTips0 comments – viewed 14,725 times – ( +10 ) – version 1.1
There are some good guides out there explaining how to work with events and the ways to attach them to your components, but none (that I know) explain the following way to configure your events with CAction classes on your controllers the following way.