Wiki

Articles in category "tips", sorted by date (updated)X
Displaying 61-70 of 142 result(s).

Fixing extensions without modifying their code

Updated about a year ago by schmunkTips3 comments – viewed 6,300 times – ( +6 ) – version 1.1
If you're working a lot with extensions you often stumble upon problems, when you want to include them into your custom web application, like hardcoded or absolute path aliases or classes extended from core application components, which implement addiditonal features.

Adding a link to a CDataColumn

Updated about a year ago by le_topTips6 comments – viewed 10,090 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.

Patching PHP code (used as a library) without changing the original code!

Updated about a year ago by le_topTips0 comments – viewed 4,063 times – ( +4 ) – version 1.1
The article Fixing extensions without modifying their code reminded me of another patching technique that I used. My conviction and a hard look on the web had led me to an article Redefine PHP class methods or class giving me a head start to do what I wanted: patching third party code without touching the original to allow easy upgrades.
tags: patch, patching

Configuring PhpStorm IDE for Yii

Updated about a year ago by samdarkTips20 comments – viewed 83,709 times – ( +66 / -1 ) – version 1.1
In order to be able to get from render or renderPartial to the view, from widget to widget class, from relations to model classes you need to install additional plugin called YiiStorm.
tags: IDE, PhpStorm

PHPStorm & NetBeans autocomplete problem

Updated about a year ago by StagelineTips2 comments – viewed 8,925 times – ( +23 ) – version 1.1
The problem: If you type Yii::app()->user<ctrl+space> code completion didn't work. This solve it.

Making friends' configs, DB credentials and paths with version control

Updated 2 years ago by ajsharmaTips1 comment – viewed 5,363 times – ( +2 / -1 ) – version 1.1
In many cases developers of one project use their own local environments for coding. There may be a common test platform and, of course, production. All these environments usually have different DB credentials and directory structures (first of all, path to YII framework directory). Another feature is debugging. It's convenient to turn it on for local environments, eventually - on the test server and never (generally speaking) - on the production.
tags: config

Guidelines for good schema design

Updated 2 years ago by softarkTips15 comments – viewed 61,848 times – ( +142 ) – version 1.1
Virtually all Yii applications are built on top of a database, and though Yii is very flexible in how it addresses your DB, some design choices make things more convenient than others.

Speedup unit tests by moving MySql data to memory (in Ubuntu)

Updated 2 years ago by Fran├žois GannazTips0 comments – viewed 8,725 times – ( +1 / -1 ) – version 1.1
Speedup unit tests by moving MySql data to memory [Ubuntu]
tags: mysql, unit test

BootProgressColumn - Progress Bar Inside GridView Column compatible with 'bootstrap' extension

Updated 2 years ago by robregonmTips1 comment – viewed 12,850 times – ( +7 ) – version 1.1
A little hint of how to create a progress bar inside the column of the grid, using the 'bootstrap' extension.

Adding 'disabled' to CCheckBoxColumn and support for yiigridview.js

Updated 2 years ago by Maurizio Domba CerinTips3 comments – viewed 10,138 times – ( +1 ) – version 1.1
I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it or on the 'select all' checkbox.