Wiki

Sorted by viewsX
Displaying 331-340 of 724 result(s).

Building a REST API in Yii2.0

Created 4 months ago by sirin kTutorials5 comments – viewed 15,040 times – ( +3 ) – version 2.0
This is wiki page is useful if you are trying to build a customized REST API in Yii2.0
tags: yii2.0, REST API

Force a User to Change Their Password (ChangePasswordFilter)

Created 3 years ago by waterloomattTutorials2 comments – viewed 14,966 times – ( +16 / -2 ) – version 1.1
Sometimes you need to force a user to change their password after x number of days. This article describes how to implement this using a filter, ChangePasswordFilter.

Rendering Views and Updating them with Ajax

Created about a year ago by Manish GuptaTips4 comments – viewed 14,696 times – ( +2 )
I wanted to implement a widget that could refresh itself through Ajax without refreshing the whole page. CGridView and CListView are excellent examples of such widgets.

Cron Jobs in Yii

Created about a year ago by aarondfrancisHow-tos1 comment – viewed 14,672 times – ( +4 )
I've gotten Yii running cron jobs, and wanted to explain briefly how I did it.

How to use the official Yii installer for Composer (**DEPRECATED**)

Created about a year ago by br0skHow-tos9 comments – viewed 14,619 times – ( +3 ) – version 1.1
This wiki shall be considered deprecated since the Yii installer for composer has been discontinued.

Checking for "expired" sessions/logins on the client side

Created about a year ago by le_topHow-tos0 comments – viewed 14,617 times – ( +5 ) – version 1.1
Getting "Expired token" errors ? Here is a solution to avoid invalid CSRF on POST or ajax requests, or user identity changes.

TDD with PHPUnit_Story and Yii

Created 3 years ago by sidewinderTutorials1 comment – viewed 14,607 times – ( +7 ) – version 1.1
Unfortunately Sebastian Bergmann decided to remove PHPUnit_Story from future PHPUnit versions. Thanks to elvan for pointing me to the relevant comment. As an alternative Behat has been suggested but it seems too bloated for me TBH. There is also PHPSpec but it's non flexible enough for me and tightly bound with English language (What's the purpose of using DSL if customers can't speak English). Since both frameworks are quite young I think I'll just stick to PHPUnit and see what's going on on the BDD frameworks arena. Even PHPUnit_Story parts of this entry are going to be deprecated soon, rest is still valid! When doing TDD, please write tests with design and behaviour of application in mind instead of testing single functions.

pass variables or content block from view file to layout file

Created 2 years ago by yiqing95How-tos0 comments – viewed 14,597 times – ( +2 ) – version 1.1
If you use yiic to generate webApplication there will be a layout folder under the protected/views/, and the Controller class under protected/components which will use by default these layouts files.

Image resize on the fly

Created 2 years ago by TpoxaHow-tos4 comments – viewed 14,567 times – ( +4 ) – version 1.1
For example have folder with image resources which are public accessible
tags: yii, image-resize

The MrFisk IRC Bot

Created 2 years ago by rAWTAZOthers0 comments – viewed 14,539 times – ( +5 ) – version 1.1
MrFisk is a sleek little bot hanging out in the official #yii IRC channel on freenode, meant to serve Yii users with documentation lookups and other things. This document intends to provide a summary of what MrFisk can do for you and how to use his fin^H^Heatures.
tags: MrFisk, YiiBot, IRC, bot