Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 81-90 of 350 result(s).

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

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

Additional form data with XUpload

Created 3 years ago by AsgarothHow-tos7 comments – viewed 33,885 times – ( +9 ) – version 1.1
In this article you'll learn how to send additional form data when uploading files using XUpload widget

Setting up PHPUnit and Selenium with IntelliJ IDEA/PhpStorm

Created 3 years ago by rAWTAZHow-tos0 comments – viewed 33,331 times – ( +7 ) – version 1.1
This article intends to summarize the steps taken to set up PHPUnit and Selenium for a Yii project, with IntelliJ IDEA Ultimate (the IDE). It was done on Mac OS X 10.6.

How to implement cron in Yii 2

Created 2 years ago by hemcHow-tos10 comments – viewed 32,886 times – ( +10 ) – version 2.0
In advance template there is already a file yii. And there is no need to run it as php, it is Linux script.
tags: cron, yii2, console

CGridView. Add custom class to table rows preserving original „odd“ and „even“

Created 2 years ago by Maug LeeHow-tos2 comments – viewed 32,783 times – ( +8 ) – version 1.1
Lets say we have such a CGridView widget showing a list of users for administrator. Users have status „active“ or „disabled“. Grid widget puts class „odd“ or „even“ to rows and we want to preserve this. So we want to add a class „disabled“ to rows with disabled users.

Simple authorization system

Created 4 years ago by GustavoHow-tos1 comment – viewed 32,616 times – ( +16 ) – version 1.1
How to create a simple (non-RBAC) authorization system

AssetManager: clearing browser's cache on site update

Created 4 years ago by dhampikHow-tos4 comments – viewed 32,437 times – ( +19 ) – version 1.1
If you like the things to be short and clear, then you can skip right to a short summary of instructions at the end of this article.

Drop down list with enum values for column of type ENUM >+> incorporate into giix

Created 4 years ago by c@cbaHow-tos3 comments – viewed 31,907 times – ( +14 ) – version 1.1
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue'). We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a drop down list, which has the enum values as options. The main code was contributed by zaccaria in the forum (see this post).

Single table inheritance

Created 4 years ago by samdarkHow-tos8 comments – viewed 31,689 times – ( +41 ) – version 1.1
Relational databases do not support inheritance so if we need to represent it, we have to somehow store meta info while keeping performance by minimizing JOINs. One way to solve this problem is using single table inheritance. All fields for the whole class tree are stored in a single table. Class name is stored in the type field of the same table.

Using the jqueryslidemenu plugin with CMenu

Created 5 years ago by Antonio RamirezHow-tos0 comments – viewed 30,905 times – ( +18 / -1 ) – version 1.1
Yii makes it really easy for all to use their already made objects that automate everything we do. It provides also great power of flexibility and styling but hey, we programmers tend to complicate our lives and push a little more the power of our tools.