The basic idea is to create a complete mail message and store it a Db table along with all info necessary for sending valid emails (to_email, from_email, from_name, subject etc.)
The basic idea is to create a complete mail message and store it a Db table along with all info necessary for sending valid emails (to_email, from_email, from_name, subject etc.)
For best experience,use Chrome.Other browsers may complain here and there.Sorry,no patience to make happy every freaking browser out there!
When using CListView to display multiple views next to each other, we can use the $index variable inside the viewFile to achieve this. As far as i know there is no extension or out-of-the-box functionality for this, so we need to apply a little hack:
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.
I've gotten Yii running cron jobs, and wanted to explain briefly how I did it.
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.
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.
A short explication on how to extract profile information for PHP on your server using XDebug and KCacheGrind or WinCacheGrind.
This example includes a composite condition as well as an empty condition - as if you bypass or disable defaultScope without using resetScope().
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).
This article explains how to easily turn standard text-line validation errors into beautifully and professionally looking Twitter Bootstrap's Popovers.
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();
`
This namespace brings utilities to interact with...
I guess this is a tip on how to execute some code before every action in a controller, because I will tell you how I did it and maybe you can use the idea in your project.
This page explains how to implement an event and catch that event in a behavior.
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...
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.
I found a standard Yii app's protected
folder structure nearly perfect. With a few simple moves and a little bit change to the code, I managed to bring it to the level, which I found as fully perfect. I want to share my point of view, in case someone would like to use this structure as well.
To accomplish the task of changing Migration table's name, by default tbl_migration, you need to add the following in your ./protected/config/console.php.