Wiki

Sorted by commentsX
Displaying 111-120 of 752 result(s).

How to use single form to collect data for two or more models (CActiveForm and Ajax Validation edition)

Created 4 years ago by RusAlexHow-tos9 comments – viewed 46,351 times – ( +22 ) – version 1.1
With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.

Yiinitializr: The Library

Created 2 years ago by Antonio RamirezOthers9 comments – viewed 15,703 times – ( +15 ) – version 1.1
Introduction

Filter / Search with CListView

Created 3 years ago by JohnPollardHow-tos9 comments – viewed 36,271 times – ( +29 ) – version 1.1
This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

Generate a multi-lever array sub-category for a menu

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos8 comments – viewed 13,647 times – ( +10 ) – version 1.1
Everyone have seen a multilayer menu in several CMS

How to use bizRules in standard accessControl filter

Created 2 years ago by Maciej LiżewskiHow-tos8 comments – viewed 11,595 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.

Accessing data in a join table with the related models

Created 3 years ago by fsbHow-tos8 comments – viewed 84,223 times – ( +26 / -1 ) – version 1.1
Sometimes the right place to store application data is in a join table. For example, movie viewers either like or don’t like the movies they watched.

Use shortcut functions to reduce typing

Created 6 years ago by qiangTutorials8 comments – viewed 44,546 times – ( +57 ) – version 1.1
Because Yii intends to be integrated nicely with third-party libraries, it does not define any global functions. Everything in Yii needs to be addressed with full class name or object scopes. For example, to access the current user, we need to use Yii::app()->user; to access application parameters, we need Yii::app()->params['name']; and so on. While editors like textmate can help alleviate the problem of these lengthy typings, it is worthwhile to define global shortcut functions to some commonly used method calls. They will make the application code look cleaner.

custom sql query results to CDetailView

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

A Multi-Tenant Strategy using Yii and MySQL

Created about a year ago by JFReyesHow-tos8 comments – viewed 14,970 times – ( +9 ) – version 1.1
This article describes an implementation of multi-tenancy using Yii and MySQL.

Saving files to a blob field in the database

Created 4 years ago by zaccariaTips8 comments – viewed 47,237 times – ( +9 / -2 ) – version 1.1
As a follow-up from the How to upload a file using a model wiki entry that explains how to save a file to the filesystem, this article will do the same using a blob field in the database.
tags: File upload