/** * @param $start * @param $end * @param null $subject * @param null $memo * @return ServicePlan */ public static function registerServicePlan($start, $end, $subject = null, $memo = null) { $servicePlan = new ServicePlan(); $servicePlan->setStart($start); $servicePlan->setEnd($end); $servicePlan->setSubject($subject); $servicePlan->setMemo($memo); return $servicePlan; }
/** * @param $from * @param $to * @return ServicePlan */ private function createServicePlan($from, $to) { $servicePlan = ServicePlan::registerServicePlan($from, $to); $this->init->servicePlanRepo->store($servicePlan); return $servicePlan; }