This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array( | |
'class' => 'CCheckBoxColumn', | |
'checked' => 'in_array($data->user_id, ' . var_export($campaign->reviewIds, 1) . ')', | |
'value' => '$data->user_id', | |
'selectableRows' => 100, | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class foo extends CActiveRecord | |
class User extends foo | |
class Post extends foo | |
userController User Post | |
========== === === | |
{ | |
function actionThatAddsUserAndPosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class foo extends CActiveRecord | |
{ | |
public function save($runValidation=true,$attributes=null) | |
{ | |
if( Yii::app()->db->getCurrentTransaction() === null ) | |
{ | |
$transaction = Yii::app()->db->beginTransaction(); | |
$transaction->attachbehavior('modelSaveTransaction', new CBehavior); |