Changeset View
Changeset View
Standalone View
Standalone View
src/applications/calendar/storage/PhabricatorCalendarEvent.php
Show First 20 Lines • Show All 620 Lines • ▼ Show 20 Lines | if ($viewer->isLoggedIn()) { | ||||
return pht('Declined'); | return pht('Declined'); | ||||
} | } | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
public function newIntermediateEventNode() { | |||||
$base_uri = new PhutilURI(PhabricatorEnv::getProductionURI('/')); | |||||
$domain = $base_uri->getDomain(); | |||||
$uid = $this->getPHID().'@'.$domain; | |||||
$created = $this->getDateCreated(); | |||||
$created = PhutilCalendarAbsoluteDateTime::newFromEpoch($created); | |||||
$modified = $this->getDateModified(); | |||||
$modified = PhutilCalendarAbsoluteDateTime::newFromEpoch($modified); | |||||
$date_start = $this->getDateFrom(); | |||||
$date_start = PhutilCalendarAbsoluteDateTime::newFromEpoch($date_start); | |||||
$date_end = $this->getDateTo(); | |||||
$date_end = PhutilCalendarAbsoluteDateTime::newFromEpoch($date_end); | |||||
if ($this->getIsAllDay()) { | |||||
$date_start->setIsAllDay(true); | |||||
$date_end->setIsAllDay(true); | |||||
} | |||||
$node = id(new PhutilCalendarEventNode()) | |||||
->setUID($uid) | |||||
->setName($this->getName()) | |||||
->setDescription($this->getDescription()) | |||||
->setCreatedDateTime($created) | |||||
->setModifiedDateTime($modified) | |||||
->setStartDateTime($date_start) | |||||
->setEndDateTime($date_end); | |||||
return $node; | |||||
} | |||||
/* -( Markup Interface )--------------------------------------------------- */ | /* -( Markup Interface )--------------------------------------------------- */ | ||||
/** | /** | ||||
* @task markup | * @task markup | ||||
*/ | */ | ||||
public function getMarkupFieldKey($field) { | public function getMarkupFieldKey($field) { | ||||
$hash = PhabricatorHash::digest($this->getMarkupText($field)); | $hash = PhabricatorHash::digest($this->getMarkupText($field)); | ||||
▲ Show 20 Lines • Show All 178 Lines • Show Last 20 Lines |