Showing 361-380 of 826 items.

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

Created 13 years ago by Maug Lee Maug Lee, updated 12 years ago by yugene yugene. 2 comments

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.

Implementation

<?php
$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'user-grid',
	'dat...
7 0
4
Viewed: 59 219 times
Version: 1.1
Category: How-tos

YII SaaS Multi Tenant application with single database

Created 13 years ago by Rajith R Rajith R, updated 12 years ago by xJose xJose. 5 comments

Lots of people are asking how to solve it with YII,We think its difficult with YII. But its easy to solve . There is no database triggers needed . we can simply sove it by extending a class(say "RActiveRecord") from CActiveRecord .Then extend all our model classes from that class.

6 1
14
Viewed: 33 205 times
Version: 1.1
Category: Tutorials

Using Nginx and Apache2 in separate distributed servers (ie, Amazon EC2 instances)

Created 13 years ago by Luis Lobo Borobia Luis Lobo Borobia, updated 9 years ago by Luis Lobo Borobia Luis Lobo Borobia. 0 comments

We are running one frontend running NGINX and several app servers running Apache2. There are several issues we have come across but right now I'll be documenting one of them. I'll be completing this article when I get more time.

2 0
2
Viewed: 18 406 times
Version: all
Category: Tips

Debugging CActiveRecord failed save() attempts

Created 13 years ago by Boaz Boaz, updated 12 years ago by Boaz Boaz. 0 comments

When you're filling up a form of a CActiveRecord (using CActiveForm for example), usually you'll construct your code so that in case of validation error you'll get back the form with the error displayed back to you, typically when CActiveForm.errorSummary() is used. This is how its done by Gii.

4 0
2
Viewed: 43 627 times
Version: 1.1
Category: Tips

Creating a Simple CRUD App With Yii2 (Revised 12/20/2013)

Created 13 years ago by Charles R. Portwood II Charles R. Portwood II, updated 12 years ago by Vivek Vivek. 7 comments

By popular demand, today I will be revisiting my previous Yii Framework 2 Getting Started Guide and updating it with what is currently available in the Yii Framework 2 Repository. Provide here is an super simple example CRUD application that will help you get started using the framework.

7 6
21
Viewed: 322 356 times
Version: 2.0
Category: Tutorials

Logging to Heroku's logs from Yii

Created 13 years ago by aarondfrancis aarondfrancis, updated 12 years ago by aarondfrancis aarondfrancis. 0 comments

In order to get your Yii logs into Heroku's logs, you have to work a little bit of magic. You'll need to modify the boot.sh script and add the following two lines: ~~~ touch /app/apache/logs/app_log tail -F /app/apache/logs/app_log & ~~~ This will set up the log and tail it so that when you request "heroku logs", this log is included.

1 0
1
Viewed: 13 340 times
Version: 1.1
Category: How-tos

Implementing menu items with progress (wait) dialog

Created 13 years ago by Trejder Trejder, updated 13 years ago by Trejder Trejder. 0 comments

This article shows one of possible ways to implement menu items (as well as links), which displays a progress / wait dialog and are redirecting browser to destination URL in the same time. This is especially useful, for links or routes that are know to be loaded for a prolonged period of time (i.e. getting a lot of data from database).

1 0
1
Viewed: 23 862 times
Version: 1.1
Category: How-tos

Yiinitializr: The Library

Created 13 years ago by Antonio Ramirez Antonio Ramirez, updated 13 years ago by Antonio Ramirez Antonio Ramirez. 9 comments

Yiinitializr\Helpers\Initializer::create('./../', 'frontend', array(

// will override frontend configuration file
__DIR__ .'/../../common/config/main.php', // merged with
__DIR__ .'/../../common/config/env.php', // merged with
__DIR__ .'/../../common/config/local.php' // merged with

))->run(); `

Yiinitializr\Cli namespace

This namespace brings utilities to interact with...

14 0
23
Viewed: 30 096 times
Version: 1.1
Category: Others

Yet another implementation of CPhpAuthManager.

Created 13 years ago by seenivasan seenivasan, updated 13 years ago by seenivasan seenivasan. 3 comments

In this wiki, I try to implement a simple authorization schema without putting much logic inside a file or into database table. We are constructing authorization hierarchy inside the controller. We are getting roles for the current user from database table and assigning only roles to user that are declared in the particular controller. We have brought down the work of loading of auth data at ma...

5 1
7
Viewed: 22 529 times
Version: 1.1
Category: How-tos

CGridView: Adding behaviors from configuration, and template items from behaviors to CGridView

Created 13 years ago by le_top le_top, updated 13 years ago by le_top le_top. 0 comments

Changing the way a CGridView is rendered from the configuration file, or through behaviors specified at the moment it is used, is handy to extend a CGridView without creating tons of different classes for it. I am surprised that this is not in the default implementation, so I made my default CGridView implementation.

3 0
3
Viewed: 18 361 times
Version: 1.1
Category: Tips