Wiki

Sorted by viewsX
Displaying 471-480 of 777 result(s).

AutoTimestampBehavior

Created 7 years ago by jonahTutorials1 comment – viewed 13,112 times – ( +2 / -2 ) – version 1.1
Note: currently a variant of this class CTimestampBehavior is included into Yii distribution package.

Yii2 and Pdf files with Mpdf

Created 2 years ago by CTalaHow-tos2 comments – viewed 13,086 times – ( +7 ) – version 2.0
I am still new to composer and packagist, so I want to share how I am creating the pdf files because for me was not as simple as it should be.

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

Created 3 years ago by Xgamer99Tips3 comments – viewed 13,063 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.

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 3 years ago by BoazHow-tos2 comments – viewed 13,054 times – ( +7 / -1 ) – version 1.1
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.

Alternative folder structure for a standard Yii app

Created 3 years ago by TrejderHow-tos4 comments – viewed 13,025 times – ( +5 ) – version 1.1
I found a standard Yii app's protected folder structure nearly perfect. With a few simple moves and a little bit change to the code, I managed to bring it to the level, which I found as fully perfect. I want to share my point of view, in case someone would like to use this structure as well.

Integrating FirePHP

Created 5 years ago by ricardogranaTutorials5 comments – viewed 12,995 times – ( +8 ) – version 1.1
Install Firebug plugin for Firefox from here.

[Updated] How to create & call custom global function in whole application?

Created 2 years ago by Rohit SutharTutorials8 comments – viewed 12,868 times – ( +5 / -2 ) – version 1.1
In this wiki I will show how to create own custom global function. It may be save the space and reduce the time.

How to ensure unicity to url

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

How to implement form events

Created about a year ago by Antonio RamirezHow-tos4 comments – viewed 12,792 times – ( +6 ) – version 2.0
You have that, when a product is on development they can change its API anytime. This change is quite important though, its related on how to set the events of your form, for example, the useful beforeSubmit.
tags: yii2, forms, how to

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

Created 3 years ago by sebTips0 comments – viewed 12,753 times – ( +1 / -1 ) – version 1.1
Speedup unit tests by moving MySql data to memory [Ubuntu]
tags: mysql, unit test