Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phriction/storage/PhrictionDocument.php
<?php | <?php | ||||
final class PhrictionDocument extends PhrictionDAO | final class PhrictionDocument extends PhrictionDAO | ||||
implements | implements | ||||
PhabricatorPolicyInterface, | PhabricatorPolicyInterface, | ||||
PhabricatorSubscribableInterface, | PhabricatorSubscribableInterface, | ||||
PhabricatorFlaggableInterface, | PhabricatorFlaggableInterface, | ||||
PhabricatorTokenReceiverInterface, | PhabricatorTokenReceiverInterface, | ||||
PhabricatorDestructibleInterface, | PhabricatorDestructibleInterface, | ||||
PhabricatorFulltextInterface, | PhabricatorFulltextInterface, | ||||
PhabricatorFerretInterface, | PhabricatorFerretInterface, | ||||
PhabricatorProjectInterface, | PhabricatorProjectInterface, | ||||
PhabricatorApplicationTransactionInterface { | PhabricatorApplicationTransactionInterface, | ||||
PhabricatorConduitResultInterface { | |||||
protected $slug; | protected $slug; | ||||
protected $depth; | protected $depth; | ||||
protected $contentID; | protected $contentID; | ||||
protected $status; | protected $status; | ||||
protected $mailKey; | protected $mailKey; | ||||
protected $viewPolicy; | protected $viewPolicy; | ||||
protected $editPolicy; | protected $editPolicy; | ||||
▲ Show 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | |||||
/* -( PhabricatorFerretInterface )----------------------------------------- */ | /* -( PhabricatorFerretInterface )----------------------------------------- */ | ||||
public function newFerretEngine() { | public function newFerretEngine() { | ||||
return new PhrictionDocumentFerretEngine(); | return new PhrictionDocumentFerretEngine(); | ||||
} | } | ||||
/* -( PhabricatorConduitResultInterface )---------------------------------- */ | |||||
public function getFieldSpecificationsForConduit() { | |||||
return array( | |||||
id(new PhabricatorConduitSearchFieldSpecification()) | |||||
->setKey('path') | |||||
->setType('string') | |||||
->setDescription(pht('The path to the document.')), | |||||
id(new PhabricatorConduitSearchFieldSpecification()) | |||||
->setKey('status') | |||||
->setType('map<string, wild>') | |||||
->setDescription(pht('Status information about the document.')), | |||||
); | |||||
} | |||||
public function getFieldValuesForConduit() { | |||||
$status = array( | |||||
'value' => $this->getStatus(), | |||||
'name' => $this->getStatusDisplayName(), | |||||
); | |||||
return array( | |||||
'path' => $this->getSlug(), | |||||
'status' => $status, | |||||
); | |||||
} | |||||
public function getConduitSearchAttachments() { | |||||
return array( | |||||
id(new PhrictionContentSearchEngineAttachment()) | |||||
->setAttachmentKey('content'), | |||||
); | |||||
} | |||||
} | } |