Wiki

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

Yii 2 list of path aliases available with default basic and advanced app.

Created 3 years ago by Kartik VTips3 comments – viewed 99,492 times – ( +53 / -6 ) – version 2.0
If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.

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

Created 5 years ago by Xgamer99Tips3 comments – viewed 14,747 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 19,494 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 14,187 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,621 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 6 years ago by zaccariaTips3 comments – viewed 14,604 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 6 years ago by Maurizio Domba CerinTips3 comments – viewed 39,587 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 6,051 times – ( +2 / -1 )
This is not actually Yii involved.

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

Created 3 years ago by Scott_HuangTips3 comments – viewed 39,943 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 6 years ago by rdjteamTips3 comments – viewed 13,356 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: