Differential D8600 Diff 20391 src/applications/harbormaster/storage/configuration/HarbormasterBuildStep.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/storage/configuration/HarbormasterBuildStep.php
<?php | <?php | ||||
final class HarbormasterBuildStep extends HarbormasterDAO | final class HarbormasterBuildStep extends HarbormasterDAO | ||||
implements PhabricatorPolicyInterface { | implements | ||||
PhabricatorPolicyInterface, | |||||
PhabricatorCustomFieldInterface { | |||||
protected $buildPlanPHID; | protected $buildPlanPHID; | ||||
protected $className; | protected $className; | ||||
protected $details = array(); | protected $details = array(); | ||||
protected $sequence; | protected $sequence; | ||||
private $buildPlan = self::ATTACHABLE; | private $buildPlan = self::ATTACHABLE; | ||||
private $customFields = self::ATTACHABLE; | |||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
'details' => self::SERIALIZATION_JSON, | 'details' => self::SERIALIZATION_JSON, | ||||
) | ) | ||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | /* -( PhabricatorPolicyInterface )----------------------------------------- */ | ||||
public function hasAutomaticCapability($capability, PhabricatorUser $viewer) { | public function hasAutomaticCapability($capability, PhabricatorUser $viewer) { | ||||
return $this->getBuildPlan()->hasAutomaticCapability($capability, $viewer); | return $this->getBuildPlan()->hasAutomaticCapability($capability, $viewer); | ||||
} | } | ||||
public function describeAutomaticCapability($capability) { | public function describeAutomaticCapability($capability) { | ||||
return pht('A build step has the same policies as its build plan.'); | return pht('A build step has the same policies as its build plan.'); | ||||
} | } | ||||
/* -( PhabricatorCustomFieldInterface )------------------------------------ */ | |||||
public function getCustomFieldSpecificationForRole($role) { | |||||
return array(); | |||||
} | |||||
public function getCustomFieldBaseClass() { | |||||
return 'HarbormasterBuildStepCustomField'; | |||||
} | |||||
public function getCustomFields() { | |||||
return $this->assertAttached($this->customFields); | |||||
} | |||||
public function attachCustomFields(PhabricatorCustomFieldAttachment $fields) { | |||||
$this->customFields = $fields; | |||||
return $this; | |||||
} | |||||
} | } |