Showing 181-200 of 373 items.

Integrating ZF2 into Yii - use case demonstrated

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

I needed to use a class from ZF2 in my Yii project. I've read probably all there is about this subject and still I needed lots of trial & errors to get it working, probably due to my lack of experience working with namepsaces and ZF2 in general. Also, the resources on the web are all partial, at best. Most simply refer to ZF1 where things are technically different. When I got it all working I de...

4 0
6
Viewed: 17 332 times
Version: 2.0
Category: How-tos

How to provide a fallback or mapping for translation messages?

Created 13 years ago by schmunk schmunk, updated 11 years ago by schmunk schmunk. 1 comment

Sometimes you want to use exisiting translations for locales, which do not directly match. An example would be a website targeting Germany (de_de), Austria (de_at) and Switzerland (de_ch, fr_ch, it_ch). Although you may have exisiting translations for German (de), French (fr) and Italian (it), there are problems using it directly.

3 0
6
Viewed: 16 193 times
Version: 1.1
Category: How-tos

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 310 times
Version: 1.1
Category: How-tos

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 377 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 899 times
Version: 1.1
Category: How-tos

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 600 times
Version: 1.1
Category: How-tos