Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 211-220 of 350 result(s).

How to customize error handling in console-mode applications

Created 5 years ago by Steve FriedlHow-tos1 comment – viewed 11,008 times – ( +3 ) – version 1.1
One can control the detail of a web application in the webroot/index.php file by manipulating the values of YII_DEBUG and YII_TRACE_LEVEL, but these don't appear to be used by console applications. This is because although the base CApplication class defines a displayError() method that does consider these variable, CConsoleApplication overrides it with a function that doesn't honor them.

How to limit number of guest page views

Created 2 years ago by PeRoChAkHow-tos1 comment – viewed 4,133 times – ( +3 ) – version 1.1
In some cases, we have to limit the number of page views for the guests users. Yii provide an efficient method to get this.

How to use BootstrapInterface

Created 2 years ago by Antonio RamirezHow-tos0 comments – viewed 5,990 times – ( +3 ) – version 2.0
Yii2 introduces the BootstrapInterface to ease our application initialization tasks, whether they are composer based or Application bootstrap (do not mistaken with Bootstrap CSS Framework) based tasks. On this article, I am going to explain how to use it on your Application bootstrap process.

Open bootstrap modal and load content via Ajax

Created 2 years ago by JbalTeroHow-tos1 comment – viewed 37,126 times – ( +3 ) – version 1.1
My goal here is to Open bootstrap modal and load ANY content using ajax response.

Localized version of CFormatter

Created 3 years ago by marcovtwoutHow-tos2 comments – viewed 4,884 times – ( +3 ) – version 1.1
Since Yii 1.1.14, a CLocalizedFormatter is available.

TimeZone dropDown

Created 3 years ago by Tibor KatelbachHow-tos0 comments – viewed 8,243 times – ( +3 ) – version 1.1
I spend a bit of time looking for the this piece of code while building time feature on a site this tutorial also helped Local time zones and locales

Handling recursive deletion in Yii

Created 3 years ago by JamesBarnsleyHow-tos3 comments – viewed 9,083 times – ( +3 ) – version 1.1
I www.jamesbarnsley.com was tasked to find a way to do recursive deletion in Yii. As I asked other developers and looked around the internet the usual answers all came up, use a plugin or use cascade delete at the DB level, but I did not want to do either of these.

Book Has Author - Many to Many relations using Kartik\Select2

Created 2 years ago by thiagoc7How-tos2 comments – viewed 11,731 times – ( +3 ) – version 2.0
I could make this work following same useful tips from this post.

How to use the official Yii installer for Composer (**DEPRECATED**)

Created 3 years ago by br0skHow-tos9 comments – viewed 35,466 times – ( +3 ) – version 1.1
This wiki shall be considered deprecated since the Yii installer for composer has been discontinued.

How to change Migration Table name and use defined prefix.

Created 3 years ago by JorgeeHow-tos1 comment – viewed 9,296 times – ( +3 ) – version 1.1
To accomplish the task of changing Migration table's name, by default tbl_migration, you need to add the following in your ./protected/config/console.php.