/** * {@inheritDoc} */ public function getFilePath($itemSource, $uidOwner) { try { $calendar = $this->calendars->find($itemSource, $uidOwner); $fileId = $calendar->getFileId(); if ($fileId === null) { return false; } $files = $this->userFolder->getById($fileId); if (!$files || empty($files)) { return false; } else { return $files[0]->getPath(); } } catch (BusinessLayer\Exception $ex) { return false; } }
/** * {@inheritDoc} */ public function getFilePath($itemSource, $uidOwner) { try { if (substr_count($itemSource, '::') === 0) { return false; } list($calendarId) = explode('::', $itemSource, 1); $calendar = $this->calendars->find($calendarId, $uidOwner); $fileId = $calendar->getFileId(); if ($fileId === null) { return false; } $files = $this->userFolder->getById($fileId); if (!$files || empty($files)) { return false; } else { return $files[0]->getPath(); } } catch (BusinessLayer\Exception $ex) { return false; } }