Wiki

Articles in category "tutorials", sorted by ratingX
Displaying 41-50 of 250 result(s).

Setting and maintaining the language in Application (i18n)

Created 7 years ago by olafureTutorials12 comments – viewed 99,258 times – ( +23 ) – version 1.1
As seen in this post, Yii doesn't enforce how language is set and maintained within the session.
tags: i18n, translation

Impersonate Users within Yii Framework

Created 5 years ago by WoilTutorials6 comments – viewed 16,107 times – ( +22 ) – version 1.1
For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".

Simple RBAC

Created 4 years ago by hasanaviTutorials17 comments – viewed 86,649 times – ( +50 / -3 ) – version 1.1
If you need simple Role based access control without the long RBAC process then this article is just for you. Lets jump to the point.

Display an AJAX tree from your DB using CTreeView

Created 6 years ago by Fran├žois GannazTutorials10 comments – viewed 55,210 times – ( +21 ) – version 1.1
This example uses a MySQL DB with a table named tree with the fields id, name, and parent_id. The parent_id will be NULL for root elements. The SQL is kept simple (no autoinc, no FK, etc).
tags: AJAX, CTreeView

Displaying, sorting and filtering HasMany & ManyMany relations in CGridView

Created 4 years ago by yJeroenTutorials8 comments – viewed 56,321 times – ( +21 ) – version 1.1
This tutorial gives you multiple options of how to fully implement showing, sorting and filtering related data in gridviews.

How to log changes of ActiveRecords?

Created 7 years ago by pfthTutorials7 comments – viewed 44,595 times – ( +40 / -2 ) – version 1.1
A simple and effective way to keep track what your users are doing within your application is to log their activities related to database modifications. You can log whenever a record was inserted, changed or deleted, and also when and by which user this was done. For a CActiveRecord Model you could use a behavior for this purpose. This way you will be able to add log functionality to ActiveRecords very easily.
tags: Logging

Filter & Sort by calculated/related fields in GridView Yii 2.0

Created 2 years ago by Kartik VTutorials23 comments – viewed 112,344 times – ( +56 / -4 ) – version 2.0
This wiki explains how to add calculated fields into your Yii Framework 2.0 gridview with filtering and sorting.

Clean JavaScript code in your views

Created 3 years ago by nineinchnickTutorials6 comments – viewed 28,832 times – ( +20 ) – version all
This tutorial presents a way of separating JS code from views and passing to it values from PHP.

Using the configuration file, explain what can be configured.

Created 6 years ago by atrandafirTutorials0 comments – viewed 62,006 times – ( +20 ) – version 1.1
The purpose of this post is to let anyone quickly find how to accomplish a configuration task, and list here all the posibilities of the config.php file and also link to pages that explain how is each thing implemented.

Theming your Zii Widgets

Created 5 years ago by Luis Lobo BorobiaTutorials16 comments – viewed 50,777 times – ( +20 ) – version 1.1
One aspect of User Interface Design has to do with the coherence of the design and the use of the colors between the different User Interface Components used.