Flesh out ApplicationTransactions/CustomField integration
Summary: None of this code is reachable yet. See discussion in D6147. Ref T1703. Provide tighter integration between ApplicationTransactions and CustomField. Basically, I'm just trying to get all the shared stuff into the base implementation. Test Plan: Code not reachable. Reviewers: chad, seporaitis Reviewed By: chad CC: aran Maniphest Tasks: T1703 Differential Revision: https://secure.phabricator.com/D6149
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
interface PhabricatorCustomFieldInterface {
|
||||
|
||||
public function getCustomFieldBaseClass();
|
||||
public function getCustomFieldSpecificationForRole($role);
|
||||
public function getCustomFields($role);
|
||||
public function attachCustomFields($role, array $fields);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// TEMPLATE IMPLEMENTATION /////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/* -( PhabricatorCustomFieldInterface )------------------------------------ */
|
||||
/*
|
||||
|
||||
private $customFields = array();
|
||||
|
||||
public function getCustomFieldSpecificationForRole($role) {
|
||||
return PhabricatorEnv::getEnvConfig(<<<'application.fields'>>>);
|
||||
}
|
||||
|
||||
public function getCustomFieldBaseClass() {
|
||||
return <<<<'YourApplicationHereCustomField'>>>>;
|
||||
}
|
||||
|
||||
public function getCustomFields($role) {
|
||||
if (idx($this->customFields, $role) === null) {
|
||||
PhabricatorCustomField::raiseUnattachedException($this, $role);
|
||||
}
|
||||
return $this->customFields;
|
||||
}
|
||||
|
||||
public function attachCustomFields($role, array $fields) {
|
||||
$this->customFields[$role] = $fields;
|
||||
return $this;
|
||||
}
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user