Changeset View
Changeset View
Standalone View
Standalone View
src/applications/almanac/storage/AlmanacDevice.php
Show First 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | return array( | ||||
id(new PhabricatorConduitSearchFieldSpecification()) | id(new PhabricatorConduitSearchFieldSpecification()) | ||||
->setKey('name') | ->setKey('name') | ||||
->setType('string') | ->setType('string') | ||||
->setDescription(pht('The name of the device.')), | ->setDescription(pht('The name of the device.')), | ||||
id(new PhabricatorConduitSearchFieldSpecification()) | id(new PhabricatorConduitSearchFieldSpecification()) | ||||
->setKey('status') | ->setKey('status') | ||||
->setType('map<string, wild>') | ->setType('map<string, wild>') | ||||
->setDescription(pht('Device status information.')), | ->setDescription(pht('Device status information.')), | ||||
id(new PhabricatorConduitSearchFieldSpecification()) | |||||
->setKey('disabled') | |||||
->setType('bool') | |||||
->setDescription(pht('True if device is disabled.')), | |||||
); | ); | ||||
} | } | ||||
public function getFieldValuesForConduit() { | public function getFieldValuesForConduit() { | ||||
$status = $this->getStatusObject(); | $status = $this->getStatusObject(); | ||||
return array( | return array( | ||||
'name' => $this->getName(), | 'name' => $this->getName(), | ||||
'status' => array( | 'status' => array( | ||||
'value' => $status->getValue(), | 'value' => $status->getValue(), | ||||
'name' => $status->getName(), | 'name' => $status->getName(), | ||||
), | ), | ||||
'disabled' => $this->isDisabled(), | |||||
); | ); | ||||
} | } | ||||
public function getConduitSearchAttachments() { | public function getConduitSearchAttachments() { | ||||
return array( | return array( | ||||
id(new AlmanacPropertiesSearchEngineAttachment()) | id(new AlmanacPropertiesSearchEngineAttachment()) | ||||
->setAttachmentKey('properties'), | ->setAttachmentKey('properties'), | ||||
); | ); | ||||
} | } | ||||
} | } |