public function listCreated($list)
{
if (empty($this->owner->customer_id)) {
return false;
}
$url = Yii::app()->options->get('system.urls.customer_absolute_url');
$url = $url . sprintf('lists/%s/overview', $list->uid);
$message = 'The list "{listName}" has been successfully created!';
$listLink = CHtml::link($list->name, $url);
$message = Yii::t('lists', $message, array('{listName}' => $listLink));
$model = new CustomerActionLog();
$model->customer_id = $this->owner->customer_id;
$model->category = CustomerActionLog::CATEGORY_LISTS_CREATED;
$model->reference_id = $list->list_id;
$model->message = $message;
return $model->save();
}
public function listCreated($list)
{
return false; // add this.
if (empty($this->owner->customer_id)) {
return false;
}
$url = Yii::app()->options->get('system.urls.customer_absolute_url');
$url = $url . sprintf('lists/%s/overview', $list->uid);
$message = 'The list "{listName}" has been successfully created!';
$listLink = CHtml::link($list->name, $url);
$message = Yii::t('lists', $message, array('{listName}' => $listLink));
$model = new CustomerActionLog();
$model->customer_id = $this->owner->customer_id;
$model->category = CustomerActionLog::CATEGORY_LISTS_CREATED;
$model->reference_id = $list->list_id;
$model->message = $message;
return $model->save();
}