Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/storage/PhabricatorProjectColumn.php
| <?php | <?php | ||||
| final class PhabricatorProjectColumn | final class PhabricatorProjectColumn | ||||
| extends PhabricatorProjectDAO | extends PhabricatorProjectDAO | ||||
| implements | implements | ||||
| PhabricatorApplicationTransactionInterface, | PhabricatorApplicationTransactionInterface, | ||||
| PhabricatorPolicyInterface, | PhabricatorPolicyInterface, | ||||
| PhabricatorDestructibleInterface, | PhabricatorDestructibleInterface, | ||||
| PhabricatorExtendedPolicyInterface { | PhabricatorExtendedPolicyInterface, | ||||
| PhabricatorConduitResultInterface { | |||||
| const STATUS_ACTIVE = 0; | const STATUS_ACTIVE = 0; | ||||
| const STATUS_HIDDEN = 1; | const STATUS_HIDDEN = 1; | ||||
| const DEFAULT_ORDER = 'natural'; | const DEFAULT_ORDER = 'natural'; | ||||
| const ORDER_NATURAL = 'natural'; | const ORDER_NATURAL = 'natural'; | ||||
| const ORDER_PRIORITY = 'priority'; | const ORDER_PRIORITY = 'priority'; | ||||
| ▲ Show 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | public function getOrderingKey() { | ||||
| } else { | } else { | ||||
| $group = 'B'; | $group = 'B'; | ||||
| $sequence = $proxy->getMilestoneNumber(); | $sequence = $proxy->getMilestoneNumber(); | ||||
| } | } | ||||
| return sprintf('%s%012d', $group, $sequence); | return sprintf('%s%012d', $group, $sequence); | ||||
| } | } | ||||
| /* -( PhabricatorConduitResultInterface )---------------------------------- */ | |||||
| public function getFieldSpecificationsForConduit() { | |||||
| return array( | |||||
| id(new PhabricatorConduitSearchFieldSpecification()) | |||||
| ->setKey('name') | |||||
| ->setType('string') | |||||
| ->setDescription(pht('The display name of the column.')), | |||||
| id(new PhabricatorConduitSearchFieldSpecification()) | |||||
| ->setKey('project') | |||||
| ->setType('map<string, wild>') | |||||
| ->setDescription(pht('The project the column belongs to.')), | |||||
| id(new PhabricatorConduitSearchFieldSpecification()) | |||||
| ->setKey('proxyPHID') | |||||
| ->setType('phid?') | |||||
| ->setDescription( | |||||
| pht( | |||||
| 'For columns that proxy another object (like a subproject or '. | |||||
| 'milestone), the PHID of the object they proxy.')), | |||||
| ); | |||||
| } | |||||
| public function getFieldValuesForConduit() { | |||||
| return array( | |||||
| 'name' => $this->getDisplayName(), | |||||
| 'proxyPHID' => $this->getProxyPHID(), | |||||
| 'project' => $this->getProject()->getRefForConduit(), | |||||
| ); | |||||
| } | |||||
| public function getConduitSearchAttachments() { | |||||
| return array(); | |||||
| } | |||||
| public function getRefForConduit() { | public function getRefForConduit() { | ||||
| return array( | return array( | ||||
| 'id' => (int)$this->getID(), | 'id' => (int)$this->getID(), | ||||
| 'phid' => $this->getPHID(), | 'phid' => $this->getPHID(), | ||||
| 'name' => $this->getDisplayName(), | 'name' => $this->getDisplayName(), | ||||
| ); | ); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines | |||||