Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / search / engineextension / PhabricatorLiskSearchEngineExtension.php
blobc4d338bc15c5596c836e79b1950afccc91f6038f
1 <?php
3 final class PhabricatorLiskSearchEngineExtension
4 extends PhabricatorSearchEngineExtension {
6 const EXTENSIONKEY = 'lisk';
8 public function isExtensionEnabled() {
9 return true;
12 public function getExtensionName() {
13 return pht('Lisk Builtin Properties');
16 public function getExtensionOrder() {
17 return 5000;
20 public function supportsObject($object) {
21 if (!($object instanceof LiskDAO)) {
22 return false;
25 if (!$object->getConfigOption(LiskDAO::CONFIG_TIMESTAMPS)) {
26 return false;
29 return true;
32 public function getFieldSpecificationsForConduit($object) {
33 return array(
34 id(new PhabricatorConduitSearchFieldSpecification())
35 ->setKey('dateCreated')
36 ->setType('int')
37 ->setDescription(
38 pht('Epoch timestamp when the object was created.')),
39 id(new PhabricatorConduitSearchFieldSpecification())
40 ->setKey('dateModified')
41 ->setType('int')
42 ->setDescription(
43 pht('Epoch timestamp when the object was last updated.')),
47 public function getFieldValuesForConduit($object, $data) {
48 return array(
49 'dateCreated' => (int)$object->getDateCreated(),
50 'dateModified' => (int)$object->getDateModified(),