Changeset View
Changeset View
Standalone View
Standalone View
src/applications/almanac/storage/AlmanacDevice.php
<?php | <?php | ||||
final class AlmanacDevice | final class AlmanacDevice | ||||
extends AlmanacDAO | extends AlmanacDAO | ||||
implements | implements | ||||
PhabricatorPolicyInterface, | PhabricatorPolicyInterface, | ||||
PhabricatorApplicationTransactionInterface, | PhabricatorApplicationTransactionInterface, | ||||
PhabricatorProjectInterface, | PhabricatorProjectInterface, | ||||
PhabricatorSSHPublicKeyInterface, | PhabricatorSSHPublicKeyInterface, | ||||
AlmanacPropertyInterface, | AlmanacPropertyInterface, | ||||
PhabricatorDestructibleInterface, | PhabricatorDestructibleInterface, | ||||
PhabricatorNgramsInterface { | PhabricatorNgramsInterface, | ||||
PhabricatorConduitResultInterface { | |||||
protected $name; | protected $name; | ||||
protected $nameIndex; | protected $nameIndex; | ||||
protected $mailKey; | protected $mailKey; | ||||
protected $viewPolicy; | protected $viewPolicy; | ||||
protected $editPolicy; | protected $editPolicy; | ||||
protected $isLocked; | protected $isLocked; | ||||
▲ Show 20 Lines • Show All 217 Lines • ▼ Show 20 Lines | /* -( PhabricatorNgramInterface )------------------------------------------ */ | ||||
public function newNgrams() { | public function newNgrams() { | ||||
return array( | return array( | ||||
id(new AlmanacDeviceNameNgrams()) | id(new AlmanacDeviceNameNgrams()) | ||||
->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 device.')), | |||||
); | |||||
} | |||||
public function getFieldValuesForConduit() { | |||||
return array( | |||||
'name' => $this->getName(), | |||||
); | |||||
} | |||||
public function getConduitSearchAttachments() { | |||||
return array( | |||||
id(new AlmanacPropertiesSearchEngineAttachment()) | |||||
->setAttachmentKey('properties'), | |||||
); | |||||
} | |||||
} | } |