Summary:
Adds a profile edit controller (with just one field and on links to it) that uses ApplicationTransactions and CustomField.
{F45617}
My plan is to move the other profile fields to this interface and get rid of Settings -> Profile. Basically, these will be "settings":
- Sex
- Language
- Timezone
These will be "profile":
- Real Name
- Title
- Blurb
- Profile Image (but I'm going to put this on a separate UI)
- Other custom fields
Test Plan: Edited my realname using the new interface.
Reviewers: chad, seporaitis
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D6152
42 lines
1.0 KiB
PHP
42 lines
1.0 KiB
PHP
<?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[$role];
|
|
}
|
|
|
|
public function attachCustomFields($role, array $fields) {
|
|
$this->customFields[$role] = $fields;
|
|
return $this;
|
|
}
|
|
|
|
*/
|