getName()); } protected function getObjectEditShortText($object) { return pht('Edit Device'); } protected function getObjectCreateShortText() { return pht('Create Device'); } protected function getObjectName() { return pht('Device'); } protected function getEditorURI() { return '/almanac/device/edit/'; } protected function getObjectCreateCancelURI($object) { return '/almanac/device/'; } protected function getObjectViewURI($object) { return $object->getURI(); } protected function getCreateNewObjectPolicy() { return $this->getApplication()->getPolicy( AlmanacCreateDevicesCapability::CAPABILITY); } protected function buildCustomEditFields($object) { return array( id(new PhabricatorTextEditField()) ->setKey('name') ->setLabel(pht('Name')) ->setDescription(pht('Name of the device.')) ->setTransactionType(AlmanacDeviceTransaction::TYPE_NAME) ->setIsRequired(true) ->setValue($object->getName()), ); } }