mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-26 21:49:08 +01:00
Summary: Ref T9979. This simplifies/standardizes the code a bit, but mostly gives us more consistent class names and structure. Test Plan: - Used `bin/search index --type ...` to index documents of every indexable type. - Searched for documents by unique text, found them. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9979 Differential Revision: https://secure.phabricator.com/D14842
34 lines
710 B
PHP
34 lines
710 B
PHP
<?php
|
|
|
|
final class PhabricatorLiskFulltextEngineExtension
|
|
extends PhabricatorFulltextEngineExtension {
|
|
|
|
const EXTENSIONKEY = 'lisk';
|
|
|
|
public function getExtensionName() {
|
|
return pht('Lisk Builtin Properties');
|
|
}
|
|
|
|
public function shouldIndexFulltextObject($object) {
|
|
if (!($object instanceof PhabricatorLiskDAO)) {
|
|
return false;
|
|
}
|
|
|
|
if (!$object->getConfigOption(LiskDAO::CONFIG_TIMESTAMPS)) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
public function indexFulltextObject(
|
|
$object,
|
|
PhabricatorSearchAbstractDocument $document) {
|
|
|
|
$document
|
|
->setDocumentCreated($object->getDateCreated())
|
|
->setDocumentModified($object->getDateModified());
|
|
|
|
}
|
|
|
|
}
|