Changeset View
Changeset View
Standalone View
Standalone View
src/applications/almanac/storage/AlmanacNetwork.php
| <?php | <?php | ||||
| final class AlmanacNetwork | final class AlmanacNetwork | ||||
| extends AlmanacDAO | extends AlmanacDAO | ||||
| implements | implements | ||||
| PhabricatorApplicationTransactionInterface, | PhabricatorApplicationTransactionInterface, | ||||
| PhabricatorPolicyInterface, | PhabricatorPolicyInterface, | ||||
| PhabricatorDestructibleInterface, | PhabricatorDestructibleInterface, | ||||
| PhabricatorNgramsInterface { | PhabricatorNgramsInterface, | ||||
| PhabricatorConduitResultInterface { | |||||
| protected $name; | protected $name; | ||||
| protected $mailKey; | protected $mailKey; | ||||
| protected $viewPolicy; | protected $viewPolicy; | ||||
| protected $editPolicy; | protected $editPolicy; | ||||
| public static function initializeNewNetwork() { | public static function initializeNewNetwork() { | ||||
| return id(new AlmanacNetwork()) | return id(new AlmanacNetwork()) | ||||
| ▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | /* -( PhabricatorNgramsInterface )----------------------------------------- */ | ||||
| public function newNgrams() { | public function newNgrams() { | ||||
| return array( | return array( | ||||
| id(new AlmanacNetworkNameNgrams()) | id(new AlmanacNetworkNameNgrams()) | ||||
| ->setValue($this->getName()), | ->setValue($this->getName()), | ||||
| ); | ); | ||||
| } | } | ||||
| /* -( PhabricatorConduitResultInterface )---------------------------------- */ | |||||
| public function getFieldSpecificationsForConduit() { | |||||
| return array( | |||||
| id(new PhabricatorConduitSearchFieldSpecification()) | |||||
| ->setKey('name') | |||||
| ->setType('string') | |||||
| ->setDescription(pht('The name of the network.')), | |||||
| ); | |||||
| } | |||||
| public function getFieldValuesForConduit() { | |||||
| return array( | |||||
| 'name' => $this->getName(), | |||||
| ); | |||||
| } | |||||
| public function getConduitSearchAttachments() { | |||||
| return array(); | |||||
| } | |||||
| } | } | ||||