/** * Creates an action reminder event. * Fires the onAfterCreate event in {@link X2Model::afterCreate} */ public function afterCreate() { if ($this->type === 'event') { $this->createCalendarFeedEvent(); } if (empty($this->type) || in_array($this->type, array('call', 'time', 'note'))) { $this->createEvents('record_create', $this->createDate); } if (empty($this->type) && $this->complete !== 'Yes' && ($this->reminder == 1 || $this->reminder == 'Yes')) { $this->createEvents('action_reminder', $this->dueDate); } if ($this->scenario != 'noNotif' && (Yii::app()->params->noSession || !$this->isAssignedTo(Yii::app()->user->getName(), true))) { $this->createNotifications(); } parent::afterCreate(); }