mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 11:22:40 +01:00
26 lines
566 B
PHP
26 lines
566 B
PHP
|
<?php
|
||
|
|
||
|
final class ManiphestProjectNameFulltextEngineExtension
|
||
|
extends PhabricatorFulltextEngineExtension {
|
||
|
|
||
|
const EXTENSIONKEY = 'maniphest.project.name';
|
||
|
|
||
|
public function getExtensionName() {
|
||
|
return pht('Maniphest Project Name Cache');
|
||
|
}
|
||
|
|
||
|
public function shouldIndexFulltextObject($object) {
|
||
|
return ($object instanceof PhabricatorProject);
|
||
|
}
|
||
|
|
||
|
public function indexFulltextObject(
|
||
|
$object,
|
||
|
PhabricatorSearchAbstractDocument $document) {
|
||
|
|
||
|
ManiphestNameIndex::updateIndex(
|
||
|
$object->getPHID(),
|
||
|
$object->getName());
|
||
|
}
|
||
|
|
||
|
}
|