Changeset View
Changeset View
Standalone View
Standalone View
src/applications/pholio/storage/PholioMock.php
<?php | <?php | ||||
final class PholioMock extends PholioDAO | final class PholioMock extends PholioDAO | ||||
implements | implements | ||||
PhabricatorMarkupInterface, | PhabricatorMarkupInterface, | ||||
PhabricatorPolicyInterface, | PhabricatorPolicyInterface, | ||||
PhabricatorSubscribableInterface, | PhabricatorSubscribableInterface, | ||||
PhabricatorTokenReceiverInterface, | PhabricatorTokenReceiverInterface, | ||||
PhabricatorFlaggableInterface, | PhabricatorFlaggableInterface, | ||||
PhabricatorApplicationTransactionInterface, | PhabricatorApplicationTransactionInterface, | ||||
PhabricatorProjectInterface, | PhabricatorProjectInterface, | ||||
PhabricatorDestructibleInterface { | PhabricatorDestructibleInterface, | ||||
PhabricatorSpacesInterface { | |||||
const MARKUP_FIELD_DESCRIPTION = 'markup:description'; | const MARKUP_FIELD_DESCRIPTION = 'markup:description'; | ||||
const STATUS_OPEN = 'open'; | const STATUS_OPEN = 'open'; | ||||
const STATUS_CLOSED = 'closed'; | const STATUS_CLOSED = 'closed'; | ||||
protected $authorPHID; | protected $authorPHID; | ||||
protected $viewPolicy; | protected $viewPolicy; | ||||
protected $editPolicy; | protected $editPolicy; | ||||
protected $name; | protected $name; | ||||
protected $originalName; | protected $originalName; | ||||
protected $description; | protected $description; | ||||
protected $coverPHID; | protected $coverPHID; | ||||
protected $mailKey; | protected $mailKey; | ||||
protected $status; | protected $status; | ||||
protected $spacePHID; | |||||
private $images = self::ATTACHABLE; | private $images = self::ATTACHABLE; | ||||
btrahan: do these images end up being in the space as well?
e.g.
user makes a mock with N images
user… | |||||
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()) | ||||
->setViewer($actor) | ->setViewer($actor) | ||||
->withClasses(array('PhabricatorPholioApplication')) | ->withClasses(array('PhabricatorPholioApplication')) | ||||
▲ Show 20 Lines • Show All 264 Lines • ▼ Show 20 Lines | $this->openTransaction(); | ||||
foreach ($images as $image) { | foreach ($images as $image) { | ||||
$image->delete(); | $image->delete(); | ||||
} | } | ||||
$this->delete(); | $this->delete(); | ||||
$this->saveTransaction(); | $this->saveTransaction(); | ||||
} | } | ||||
/* -( PhabricatorSpacesInterface )----------------------------------------- */ | |||||
public function getSpacePHID() { | |||||
return $this->spacePHID; | |||||
} | |||||
} | } |
do these images end up being in the space as well?
e.g.
user makes a mock with N images
user moves the mock to a space
...the N images are also in the space with respect to viewability?