Merge "HTMLForm: Add OOUI support for 'multiselect' with 'dropdown' => true"
[mediawiki.git] / includes / search / DummySearchIndexFieldDefinition.php
bloba2a676019286ba0de423fdd131556dae9b229b5d
1 <?php
3 /**
4 * Dummy implementation of SearchIndexFieldDefinition for testing purposes.
6 * @since 1.28
7 */
8 class DummySearchIndexFieldDefinition extends SearchIndexFieldDefinition {
10 /**
11 * @param SearchEngine $engine
13 * @return array
15 public function getMapping( SearchEngine $engine ) {
16 $mapping = [
17 'name' => $this->name,
18 'type' => $this->type,
19 'flags' => $this->flags,
20 'subfields' => []
23 foreach ( $this->subfields as $subfield ) {
24 $mapping['subfields'][] = $subfield->getMapping();
27 return $mapping;