mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Make ReleephRequest implement PhabricatorCustomFieldInterface
Summary: Ref T3718. Doesn't do anything yet. Test Plan: Viewed and edited a request. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3718 Differential Revision: https://secure.phabricator.com/D6753
This commit is contained in:
parent
026137f92f
commit
f7b289e3a4
2 changed files with 30 additions and 1 deletions
|
@ -4177,6 +4177,7 @@ phutil_register_library_map(array(
|
|||
array(
|
||||
0 => 'ReleephDAO',
|
||||
1 => 'PhabricatorPolicyInterface',
|
||||
2 => 'PhabricatorCustomFieldInterface',
|
||||
),
|
||||
'ReleephRequestActionController' => 'ReleephProjectController',
|
||||
'ReleephRequestCommentController' => 'ReleephProjectController',
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<?php
|
||||
|
||||
final class ReleephRequest extends ReleephDAO
|
||||
implements PhabricatorPolicyInterface {
|
||||
implements
|
||||
PhabricatorPolicyInterface,
|
||||
PhabricatorCustomFieldInterface {
|
||||
|
||||
protected $phid;
|
||||
protected $branchID;
|
||||
|
@ -21,6 +23,8 @@ final class ReleephRequest extends ReleephDAO
|
|||
|
||||
// Pre-populated handles that we'll bulk load in ReleephBranch
|
||||
private $handles;
|
||||
private $customFields = self::ATTACHABLE;
|
||||
|
||||
|
||||
|
||||
/* -( Constants and helper methods )--------------------------------------- */
|
||||
|
@ -292,8 +296,10 @@ final class ReleephRequest extends ReleephDAO
|
|||
return parent::setUserIntents($ar);
|
||||
}
|
||||
|
||||
|
||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
||||
|
||||
|
||||
public function getCapabilities() {
|
||||
return array(
|
||||
PhabricatorPolicyCapability::CAN_VIEW,
|
||||
|
@ -309,4 +315,26 @@ final class ReleephRequest extends ReleephDAO
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
/* -( PhabricatorCustomFieldInterface )------------------------------------ */
|
||||
|
||||
|
||||
public function getCustomFieldSpecificationForRole($role) {
|
||||
return PhabricatorEnv::getEnvConfig('releeph.fields');
|
||||
}
|
||||
|
||||
public function getCustomFieldBaseClass() {
|
||||
return 'ReleephFieldSpecification';
|
||||
}
|
||||
|
||||
public function getCustomFields() {
|
||||
return $this->assertAttached($this->customFields);
|
||||
}
|
||||
|
||||
public function attachCustomFields(PhabricatorCustomFieldAttachment $fields) {
|
||||
$this->customFields = $fields;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue