Wiki

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

defaultScope

Created 4 years ago by Gerhard LiebenbergHow-tos4 comments – viewed 22,253 times – ( +5 / -2 ) – version 1.1
This example includes a composite condition as well as an empty condition - as if you bypass or disable defaultScope without using resetScope().

Multiple Database Connection : Select database based on login user id, Dynamic

Created 3 years ago by Rajith RHow-tos4 comments – viewed 27,092 times – ( +9 / -7 ) – version 1.1
create a class file under protected\components named RActiveRecord.php

Creating and updating model and its related models in one form, inc. image

Created 4 years ago by BoazHow-tos11 comments – viewed 91,973 times – ( +6 / -4 ) – version 1.1
We start slowly and simple...

How to insert a Simple Dialog Box

Created 5 years ago by bluyellHow-tos6 comments – viewed 29,166 times – ( +5 / -3 ) – version 1.1
I build this simple PHP class (DialogBox.php at the bottom of this wiki) to help you in the dialog box usage on Yii applications. The goal is run any Yii actions into this dialog box and return the resulting value to the calling instance.

How to show a Captcha in CForm?

Created 2 years ago by Rohit SutharHow-tos0 comments – viewed 8,323 times – ( +5 / -3 ) – version 1.1
In this wiki I will show how could use a Captcha in yii CForm. The easy way to show captcha image is create a form using CHtml method & CActiveForm, but CForm also should be able to show a captcha.
tags: captcha, CForm, widget

model rules depended by user roles-permissions

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 10,481 times – ( +3 / -1 )
This is a reference about model validators and user roles. In many cases we want model validators to applied only for some privileged users or not

How to use bizRules in standard accessControl filter

Created 3 years ago by Maciej Li┼╝ewskiHow-tos8 comments – viewed 14,810 times – ( +3 / -1 ) – version 1.1
I assume you are familiar with accessControl standard filter. It allows you to separate privileges to run some action from action code itself. There is however one problem with most common usage - you cannot use bizRules, at least based on some parameters passed to 'checkAccess' just because it is hard to pass them in accessRules() result.

History Autocomplete

Created 5 years ago by zaccariaHow-tos2 comments – viewed 9,175 times – ( +3 / -1 ) – version 1.1
In application development we often have to choose how to mange recurrent values.
tags: autocomplete

custom sql query results to CDetailView

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos8 comments – viewed 32,580 times – ( +3 / -1 ) – version 1.1
This is a bried guide about displaying of custom sql query results.

How to install Yii 2 advanced on a shared hosting environment

Created about a year ago by oligalmaHow-tos1 comment – viewed 13,873 times – ( +3 / -1 ) – version 2.0
I've read many comments that it's not possible to install Yii 2 advanced on a shared hosting environment, as it has two webroots. This is partially true.