| @@ 54-63 (lines=10) @@ | ||
| 51 | * |
|
| 52 | * @return bool |
|
| 53 | */ |
|
| 54 | public function createEvent($data) |
|
| 55 | { |
|
| 56 | $event = $this->create(); |
|
| 57 | $this->checkDate($data); |
|
| 58 | $this->userTimeToServerTime($data); |
|
| 59 | $this->addRecurValue($data); |
|
| 60 | $event->setVars($data); |
|
| 61 | ||
| 62 | return $this->insert($event, true); |
|
| 63 | } |
|
| 64 | ||
| 65 | /** |
|
| 66 | * @param $data |
|
| @@ 86-95 (lines=10) @@ | ||
| 83 | * |
|
| 84 | * @return bool |
|
| 85 | */ |
|
| 86 | public function modifyEvent($eventId, $data) |
|
| 87 | { |
|
| 88 | $event = $this->get($eventId); |
|
| 89 | $this->checkDate($data); |
|
| 90 | $this->userTimeToServerTime($data); |
|
| 91 | $this->addRecurValue($data); |
|
| 92 | $event->setVars($data); |
|
| 93 | ||
| 94 | return $this->insert($event); |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * @param $eventId |
|