Changeset View
Changeset View
Standalone View
Standalone View
src/applications/pholio/storage/PholioMock.php
Show All 13 Lines | final class PholioMock extends PholioDAO | ||||
protected $authorPHID; | protected $authorPHID; | ||||
protected $viewPolicy; | protected $viewPolicy; | ||||
protected $name; | protected $name; | ||||
protected $originalName; | protected $originalName; | ||||
protected $description; | protected $description; | ||||
protected $coverPHID; | protected $coverPHID; | ||||
protected $mailKey; | protected $mailKey; | ||||
protected $status; | |||||
private $images = self::ATTACHABLE; | private $images = self::ATTACHABLE; | ||||
private $allImages = self::ATTACHABLE; | private $allImages = self::ATTACHABLE; | ||||
private $coverFile = self::ATTACHABLE; | private $coverFile = self::ATTACHABLE; | ||||
private $tokenCount = self::ATTACHABLE; | private $tokenCount = self::ATTACHABLE; | ||||
public static function initializeNewMock(PhabricatorUser $actor) { | public static function initializeNewMock(PhabricatorUser $actor) { | ||||
$app = id(new PhabricatorApplicationQuery()) | $app = id(new PhabricatorApplicationQuery()) | ||||
▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | public function getImageHistorySet($image_id) { | ||||
while (isset($replace_map[$image->getPHID()])) { | while (isset($replace_map[$image->getPHID()])) { | ||||
$image = $replace_map[$image->getPHID()]; | $image = $replace_map[$image->getPHID()]; | ||||
$history[$image->getID()] = $image; | $history[$image->getID()] = $image; | ||||
} | } | ||||
return $history; | return $history; | ||||
} | } | ||||
public function getStatuses() { | |||||
$options = array(); | |||||
$options['closed'] = 'Closed'; | |||||
$options['open'] = 'Open'; | |||||
return $options; | |||||
} | |||||
public function isClosed() { | |||||
return ($this->getStatus() == 'closed'); | |||||
} | |||||
/* -( PhabricatorSubscribableInterface Implementation )-------------------- */ | /* -( PhabricatorSubscribableInterface Implementation )-------------------- */ | ||||
public function isAutomaticallySubscribed($phid) { | public function isAutomaticallySubscribed($phid) { | ||||
return ($this->authorPHID == $phid); | return ($this->authorPHID == $phid); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |