Wiki

Sorted by viewsX
Displaying 401-410 of 774 result(s).

Code style

Created 5 years ago by zaccariaTips2 comments – viewed 16,651 times – ( +30 ) – version 1.1
Often, when writing widgets or editing Yii code, it is unclear whether or not the code is following the MVC pattern.
tags: mvc

Log Activity in DataBase

Created 3 years ago by mahdi1986Tutorials6 comments – viewed 16,606 times – ( +8 ) – version 1.1
In this article i will explain how to customize log activity in database, Imaging you need to save IP user, Url request and user_name in database,But table created by default with Yii only have id,level,category,logtime and message

Save or Update Multiple related model values in one Tabular input form

Created 2 years ago by Kostas Apazidis (KonApaz)Tutorials4 comments – viewed 16,468 times – ( +1 / -7 ) – version 1.1
In this wiki I will show you how to save/update a model with many related model For example: How to set a product to multiple categories only in one post form ?

Using Grunt for deploying client scripts

Created 3 years ago by Chris83How-tos8 comments – viewed 16,257 times – ( +11 ) – version 1.1
For a long time I have struggled to find a suitable tool for doing server tasks such as compiling LESS files, concatenating and minifying of JavaScript files and copying the minified JavaScript files. While most of these tasks can be done with Yii extensions I would still not recommend using them because it requires you to include these extensions in your project, and therefore also deploying them in your production environment.

Yii 2.0: Write & use a custom Component in Yii2.0 (Advanced Template)

Created about a year ago by Deepak PradhanHow-tos1 comment – viewed 16,225 times – version 2.0
This is an extension to Yii 2.0: Write & use a custom Component in Yii2.0 for Advanced Template

Extending CActiveForm for some form display fixes and language tweaks

Created 5 years ago by TrejderTips0 comments – viewed 16,172 times – ( +5 ) – version 1.1
In this simple example I'll demonstrate how to extend CActiveForm class to overload some drawing functions to achieve some commonly used fixes in forms.

HOW TO: Use token based authentication

Created 2 years ago by le_topHow-tos2 comments – viewed 16,143 times – ( +4 ) – version 1.1
After reading the other wiki article regarding token based access, I thought that it might be interesting to share my method.

CSV Export

Created 4 years ago by JohnPollardHow-tos5 comments – viewed 16,140 times – ( +4 ) – version 1.1
I needed a csv export function for my cgridview and I wanted to export the entire result set of the sorted and filtered cgridview the user was viewing via ajax.
tags: csv, export

How to implement an event and attach it in a behavior

Created 3 years ago by seb7How-tos0 comments – viewed 16,028 times – ( +6 ) – version 1.1
This page explains how to implement an event and catch that event in a behavior.
tags: event, behavior

Customizing Yii's formatting rules (extending CFormatter)

Created 4 years ago by HaenselTips0 comments – viewed 15,967 times – ( +14 ) – version 1.1
CFormatter is one of Yii's core components and used to format values displayed in widgets like CGridView or CDetailView. All classic formats like numbers, text, urls or datetime are supported but you may have to use a formatting rule that isn't built in. Let's say we want to display arrays of strings (like tags associated with a product model). When using CDetailView we would usually make use of PHPs implode function to create a simple string value of all values in the $product->tags array.