type = $type; } public function save($data = array()) { if(!ExcludeNotificationTypeEnum::isValidValue($this->type)) { throw new \Exception('Invalid Exclude Notification Type'); } parent::save($data); } }