Wiki

Articles in category "tips", sorted by commentsX
Displaying 51-60 of 154 result(s).

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

Created 4 years ago by Xgamer99Tips3 comments – viewed 14,247 times – ( +1 / -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.

A simple class to use a different db for a module

Created 6 years ago by tydeas_drTips3 comments – viewed 18,854 times – ( +10 / -1 ) – version 1.1
What would you do if you want/need to have a different than the main database connection in an module's models?

PHPStorm & NetBeans autocomplete problem

Created 4 years ago by StagelineTips3 comments – viewed 13,717 times – ( +24 / -1 ) – version 1.1
The problem: If you type Yii::app()->user<ctrl+space> code completion didn't work. This solve it.

Fixing extensions without modifying their code

Created 4 years ago by schmunkTips3 comments – viewed 10,140 times – ( +6 / -1 ) – 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.

How to ensure unicity to url

Created 5 years ago by zaccariaTips3 comments – viewed 14,044 times – ( +14 / -1 ) – version 1.1
Many time for SEO porpouses is important that each page will have a unique address.
tags: SEO, unique, URL

Display a nice exception message on ajax requests

Created 5 years ago by Maurizio Domba CerinTips3 comments – viewed 38,616 times – ( +13 / -1 ) – version 1.1
When an exception is thrown in our code like
tags: error, exception

More on SSE and Yii

Created 4 years ago by FirebreakerTips3 comments – viewed 5,770 times – ( +2 / -1 )
This is not actually Yii involved.

Step by step for how to full export Yii2 grid to excel

Created 2 years ago by Scott_HuangTips3 comments – viewed 37,219 times – ( -1 ) – version 2.0
We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview:

Como trasponer una lista creada con CHtml::checkBoxList

Created 5 years ago by rdjteamTips3 comments – viewed 13,033 times – ( +2 / -1 ) – version 1.1
En ciertas ocasiones tenemos que lidiar con el tema de colocar una lista de checkboxes para hacer una seleccion especifica como es el caso de los dias de la semana para un calendario, para esta labor tenemos el comando CHtml::checkBoxList(), revisando un poco el funcionamiento de este temos los siguientes parametros:

Useful Multilanguage extensions collection and use.

Created 3 years ago by cihappyTips2 comments – viewed 6,443 times – ( +3 / -1 ) – version 1.1
What I want to achieve: