Wiki

Sorted by viewsX
Displaying 461-470 of 597 result(s).

An important tip when you are using CArrayDataProvider.

Created about a year ago by sirin kTips0 comments – viewed 6,391 times – ( +7 / -1 ) – version 1.1
Yii ‘s CArrayDataProvider is very helpful to display model relation data's directly on it.But it is truely a confusing one because by default it will assume a table field named “id” as primary key for its pagination purpose and what if you dont have field named “id” as primary key on your table? so its truely confusing and if you tried to display without an “id” field on ur table you will get an error like “yourmodel.id is not defined”.

How to use bizRules in standard accessControl filter

Created 9 months ago by redguyHow-tos8 comments – viewed 6,388 times – ( +3 )
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.

embed a view file of the class which implement the CAction.

Created 3 years ago by DavidhhuanTutorials1 comment – viewed 6,319 times – ( +1 / -1 ) – version 1.1
In Yii, we can define an action class and ask the controller to instantiate it. And we always create ourselves actions class in rootPath/protected/extensions, and the view file we called in the actions class always are located in rootPath/protected/views/ControllerNAME or rootPath/themes/ThemeNAME/ControllerNAME, then when we use the same actions class in different controllers, we have to copy it from one controller to the other controller, so we also need the "same" view file work for us, here is an example.
tags: actions, render, views

How-To: Create Token Authenticated Web Services

Created 3 months ago by hemcHow-tos1 comment – viewed 6,275 times – ( +7 ) – version 1.1
This article is about implementing authentication to Yii based web services.

Update a part of content using AJAX when select a GridView row

Created 4 months ago by KonApazHow-tos2 comments – viewed 6,267 times – ( +4 ) – version 1.1
Suppose you want to refresh a form or any content when a single row of CGridView is selected

Debugging CActiveRecord failed save() attempts

Created 10 months ago by BoazTips0 comments – viewed 6,246 times – ( +4 ) – version 1.1
When you're filling up a form of a CActiveRecord (using CActiveForm for example), usually you'll construct your code so that in case of validation error you'll get back the form with the error displayed back to you, typically when CActiveForm.errorSummary() is used. This is how its done by Gii.

BaseModuleAR class with MultiActiveRecord

Created 2 years ago by dinhtrungTips0 comments – viewed 6,235 times – ( +2 ) – version 1.1
MultiActiveRecord is an extension that add support for multiple database connection for your application.

Reading the doc

Created 3 years ago by zaccariaTips0 comments – viewed 6,216 times – ( +21 ) – version 1.1
Almost all the information you need whilst working with yii is written in the Class Reference.
tags: doc

Yii tinymce结合syntaxHighlighter和syntax

Created 2 years ago by Darwin WenTutorials0 comments – viewed 6,202 times – ( +1 ) – version 1.1
首先我们需要下载好Yii tinymce扩展,放入你的extensions目录下,

Mais segurança em suas aplicações com Yii e PHPIDS

Created 3 years ago by Rafael GarciaHow-tos0 comments – viewed 6,201 times – ( +2 / -1 ) – version 1.1
PHPIDS é conhecido projeto que pode ser visto em php-ids.org.
tags: phpids, security