Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 191-200 of 322 result(s).

model rules depended by user roles-permissions

Created about a year ago by KonApazHow-tos0 comments – viewed 6,340 times – ( +3 )
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

Pjax on ActiveForm and GridView - Yii2

Created about a month ago by SreenadhHow-tos1 comment – viewed 3,058 times – ( +3 ) – version 2.0
Here is a example on how to use Pjax with GridView (yii\grid\GridView) and ActiveForm (yii\widgets\ActiveForm) widgets in Yii2.

How to use bizRules in standard accessControl filter

Created about a year ago by redguyHow-tos8 comments – viewed 9,133 times – ( +3 ) – 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 2 years ago by zaccariaHow-tos2 comments – viewed 7,415 times – ( +3 ) – 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 about a year ago by KonApazHow-tos2 comments – viewed 17,028 times – ( +3 )
This is a bried guide about displaying of custom sql query results.

Adding Bash Command Completion for Yii Commands

Created 2 years ago by Dustin OpreaHow-tos0 comments – viewed 6,907 times – ( +3 ) – version 1.1
This article discusses the installation/configuration of the YiiBash project (https://github.com/dsoprea/YiiBash).

Alternative wildcard characters CDbCriteria

Created 2 years ago by maigretHow-tos0 comments – viewed 5,395 times – ( +3 ) – version 1.1
In SQL, wildcard characters can be used in "LIKE" expressions; the percent sign (%) matches zero or more characters, and underscore (_) a single character. Sometimes users are not familiar with these or they are using different ones like (*) and (+) similar to regular expressions. My colleages do so and then i decided to add this feature by extending CbCriteria. Especially adding a new parameter $wildcard_chars to the method addSearchCondition to replace them if needed with standard SQL characters:

Simple Multiple Environment Setup with Default Yii Installation

Created 10 months ago by turiHow-tos2 comments – viewed 4,176 times – ( +3 ) – version 1.1
After installing Yii basic application on our systems, most of the time we want to have multiple environment such as local, dev and live setup. Most of the times when we want to make changes to configuration file, we have to over-write configurations file for each environment.

How to create Module based Login

Created 10 months ago by turiHow-tos1 comment – viewed 8,649 times – ( +3 ) – version 1.1
Lets say we have 3 modules (customer, user, admin) in an application and we need, separate logins for each module.

How to customize error handling in console-mode applications

Created 4 years ago by Steve FriedlHow-tos1 comment – viewed 8,927 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.