Differential D19269 Diff 46127 src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php
<?php | <?php | ||||
final class HarbormasterBuildArtifact extends HarbormasterDAO | final class HarbormasterBuildArtifact | ||||
implements PhabricatorPolicyInterface { | extends HarbormasterDAO | ||||
implements | |||||
PhabricatorPolicyInterface, | |||||
PhabricatorDestructibleInterface { | |||||
protected $buildTargetPHID; | protected $buildTargetPHID; | ||||
protected $artifactType; | protected $artifactType; | ||||
protected $artifactIndex; | protected $artifactIndex; | ||||
protected $artifactKey; | protected $artifactKey; | ||||
protected $artifactData = array(); | protected $artifactData = array(); | ||||
protected $isReleased = 0; | protected $isReleased = 0; | ||||
▲ Show 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | return $this->getBuildTarget()->hasAutomaticCapability( | ||||
$capability, | $capability, | ||||
$viewer); | $viewer); | ||||
} | } | ||||
public function describeAutomaticCapability($capability) { | public function describeAutomaticCapability($capability) { | ||||
return pht('Users must be able to see a buildable to see its artifacts.'); | return pht('Users must be able to see a buildable to see its artifacts.'); | ||||
} | } | ||||
/* -( PhabricatorDestructibleInterface )----------------------------------- */ | |||||
public function destroyObjectPermanently( | |||||
PhabricatorDestructionEngine $engine) { | |||||
$viewer = $this->getViewer(); | |||||
$this->openTransaction(); | |||||
$this->releaseArtifact($viewer); | |||||
$this->delete(); | |||||
$this->saveTransaction(); | |||||
} | |||||
} | } |