commentModel->create(array( 'reference' => isset($data['reference']) ? $data['reference'] : '', 'comment' => $data['comment'], 'task_id' => $data['task_id'], 'user_id' => isset($data['user_id']) && $this->projectPermissionModel->isAssignable($this->getProjectId(), $data['user_id']) ? $data['user_id'] : 0, )); } /** * Check if the event data meet the action condition * * @access public * @param array $data Event data dictionary * @return bool */ public function hasRequiredCondition(array $data) { return ! empty($data['comment']); } }