本文整理汇总了PHP中OwnedSecurableItem::afterSave方法的典型用法代码示例。如果您正苦于以下问题:PHP OwnedSecurableItem::afterSave方法的具体用法?PHP OwnedSecurableItem::afterSave怎么用?PHP OwnedSecurableItem::afterSave使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OwnedSecurableItem
的用法示例。
在下文中一共展示了OwnedSecurableItem::afterSave方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: afterSave
protected function afterSave()
{
if ($this->isNewModel && !$this->isCompleted) {
Yii::app()->jobQueue->add('Export', 5);
}
parent::afterSave();
}
示例2: afterSave
protected function afterSave()
{
Yii::app()->custom->resolveOpportunityCustomActionsAfterSave($this);
parent::afterSave();
}
示例3: afterSave
/**
* After a mission is saved, if it is new, then a notification should go out to all users alerting them
* of a new mission. Depending on the status change of the mission, a notification can go out as well to
* the owner or user who has taken the mission.
*/
protected function afterSave()
{
if ($this->isNewModel && $this->getScenario() != 'importModel') {
MissionsUtil::makeAndSubmitNewMissionNotificationMessage($this);
}
if (isset($this->originalAttributeValues['status']) && !$this->isNewModel && $this->originalAttributeValues['status'] != $this->status) {
if ($this->status == self::STATUS_TAKEN) {
$messageContent = Zurmo::t('MissionsModule', 'A mission you created has been taken on by {takenByUserName}', array('{takenByUserName}' => strval($this->takenByUser)));
MissionsUtil::makeAndSubmitStatusChangeNotificationMessage($this->owner, $this->id, $messageContent);
} elseif ($this->status == self::STATUS_COMPLETED) {
$messageContent = Zurmo::t('MissionsModule', 'A mission you created has been completed');
MissionsUtil::makeAndSubmitStatusChangeNotificationMessage($this->owner, $this->id, $messageContent);
} elseif ($this->status == self::STATUS_REJECTED && $this->takenByUser->id > 0) {
$messageContent = Zurmo::t('MissionsModule', 'A mission you completed has been rejected');
MissionsUtil::makeAndSubmitStatusChangeNotificationMessage($this->takenByUser, $this->id, $messageContent);
} elseif ($this->status == self::STATUS_ACCEPTED && $this->takenByUser->id > 0) {
$messageContent = Zurmo::t('MissionsModule', 'A mission you completed has been accepted');
MissionsUtil::makeAndSubmitStatusChangeNotificationMessage($this->takenByUser, $this->id, $messageContent);
}
}
parent::afterSave();
}
示例4: afterSave
protected function afterSave()
{
$this->deleteCampaignItemsForUnsetEmailMessagesIfPausedToggledToActiveStatus();
$resolveForOldModel = false;
if (isset($this->originalAttributeValues['status']) && $this->status == static::STATUS_ACTIVE) {
$resolveForOldModel = true;
}
Yii::app()->jobQueue->resolveToAddJobTypeByModelByDateTimeAttribute($this, 'sendOnDateTime', 'CampaignGenerateDueCampaignItems', $resolveForOldModel);
parent::afterSave();
}
示例5: afterSave
/**
* Handle audit of projects after save
*/
protected function afterSave()
{
if ($this->getIsNewModel()) {
ProjectAuditEvent::logAuditEvent(ProjectAuditEvent::PROJECT_CREATED, $this, $this->name);
} elseif ($this->status == Project::STATUS_ARCHIVED) {
ProjectAuditEvent::logAuditEvent(ProjectAuditEvent::PROJECT_ARCHIVED, $this, $this->name);
}
parent::afterSave();
}
示例6: afterSave
/**
* Handle audit of projects after save
*/
protected function afterSave()
{
if ($this->getIsNewModel()) {
ProjectAuditEvent::logAuditEvent(ProjectAuditEvent::PROJECT_CREATED, $this, $this->name);
ProjectsNotificationUtil::submitProjectNotificationMessage($this, ProjectAuditEvent::PROJECT_CREATED);
} elseif ($this->status == Project::STATUS_ARCHIVED && isset($this->originalAttributeValues['status'])) {
ProjectAuditEvent::logAuditEvent(ProjectAuditEvent::PROJECT_ARCHIVED, $this, $this->name);
ProjectsNotificationUtil::submitProjectNotificationMessage($this, ProjectAuditEvent::PROJECT_ARCHIVED);
}
parent::afterSave();
}
示例7: afterSave
protected function afterSave()
{
Yii::app()->jobQueue->resolveToAddJobTypeByModelByDateTimeAttribute($this, 'sendOnDateTime', 'CampaignGenerateDueCampaignItems');
parent::afterSave();
}
示例8: afterSave
protected function afterSave()
{
$this->Contract_Number = 'Agmnt-' . $this->id;
$this->save();
parent::afterSave();
}