Page MenuHomePhorge

PhrictionContentSearchEngineAttachment.php
No OneTemporary

Size
742 B
Referenced Files
None
Subscribers
None

PhrictionContentSearchEngineAttachment.php

<?php
final class PhrictionContentSearchEngineAttachment
extends PhabricatorSearchEngineAttachment {
public function getAttachmentName() {
return pht('Document Content');
}
public function getAttachmentDescription() {
return pht('Get the content of documents or document histories.');
}
public function getAttachmentForObject($object, $data, $spec) {
if ($object instanceof PhrictionDocument) {
$content = $object->getContent();
} else {
$content = $object;
}
return array(
'title' => $content->getTitle(),
'path' => $content->getSlug(),
'authorPHID' => $content->getAuthorPHID(),
'content' => array(
'raw' => $content->getContent(),
),
);
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, May 13, 1:09 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
124304
Default Alt Text
PhrictionContentSearchEngineAttachment.php (742 B)

Event Timeline