Displaying 611-620 of 774 result(s).

An easy way to use escopes and CActiveDataProvider

Created 5 years ago by Rafael GarciaTips8 comments – viewed 27,237 times – ( +1 / -1 ) – version 1.1
Often used scopes to define criteria in our models. This is a very useful feature as it ensures that in any part of application applying the criteria defined by the scope when called it.

An easy way to display a success page using flash messages

Created 5 years ago by qiangTips2 comments – viewed 35,917 times – ( +28 ) – version 1.1
We often need to display a success page after the user has submitted a form without problem. We may show some welcome message after a user registers a new account. There are many ways to implement this workflow. In this article, I will explain a method that exploits flash messages.

To configure Yii path in Windows platform

Created 5 years ago by CodaTutorials2 comments – viewed 37,892 times – ( +3 / -6 ) – version 1.1
I can see many questions regarding configuring the path using Windows OS. I could hardly get the right information about it. The cook book has defined for Linux. So I would like to share my idea on it. To configure the Yii path using Windows OS,

Actions code reuse with CAction

Created 5 years ago by Antonio RamirezHow-tos13 comments – viewed 39,237 times – ( +36 ) – version 1.1
We all know how good 'gii' automates the code for us and we normally tend to be happy with what that tool offers at the beginning of our Yii learning curve. But as soon as you start working in larger and larger projects, you realize that its code is too repetitive to maintain and having a small pitfall in general actions means to go over and over through them to fix the issues.
tags: CAction, Tutorial

Configuring controller access rules to default-deny

Created 5 years ago by Steve FriedlHow-tos3 comments – viewed 77,613 times – ( +12 ) – version 1.1
Starting with the blog tutorial, Yii developers are familiar with the notion of access rules defined in the controller, where the actions are allowed or denied depending on the user's name or role.

Create your own Validation Rule

Created 5 years ago by nickcvHow-tos13 comments – viewed 178,657 times – ( +76 / -3 ) – version 1.1
Some times the core validation rules provided by Yii won't satisfy all your needs, so you'll need to create your very own validation rule.

Understanding Virtual Attributes and get/set methods

Created 5 years ago by Steve FriedlTutorials20 comments – viewed 132,371 times – ( +79 / -1 ) – version 1.1
When you define or extend a class, you can create class variables and methods in Yii just like you can in any other PHP system:

caching controllers with filters()

Created 5 years ago by RusAlexHow-tos1 comment – viewed 12,213 times – ( +2 ) – version 1.1
Hello, this article will describe some aspects about caching controllers with filters() method in your controller. And I will describe some problems I meet when using this approach for caching, the main problem was

Understanding Autoloading, Helper Classes and Helper Functions

Created 5 years ago by Steve FriedlTutorials4 comments – viewed 91,026 times – ( +29 ) – version 1.1
Many Yii users ask how to create helper classes and functions, and though there are numerous approaches spread out among the forum and wiki articles, this Tutorial tries to bring it all together in one place.

Updating fields on a form with Ajax and Json

Created 5 years ago by Russell EnglandHow-tos4 comments – viewed 54,090 times – ( +12 / -1 ) – version 1.1
I'm developing a website that has an option to look up a car's registration number via SOAP and return additional details such as make, model, colour etc.