You are here

class MetatagSearchTestSearchApiService in Metatag 7

Dummy Search API service class.

Hierarchy

Expanded class hierarchy of MetatagSearchTestSearchApiService

1 string reference to 'MetatagSearchTestSearchApiService'
metatag_search_test_search_api_service_info in tests/metatag_search_test.module
Implements hook_search_api_service_info().

File

tests/metatag_search_test.module, line 23
Metatag: Search API test helper module.

View source
class MetatagSearchTestSearchApiService extends SearchApiAbstractService {

  /**
   * @inheritdoc
   */
  public function indexItems(SearchApiIndex $index, array $items) {
    variable_set('metatag_search_test_keywords', FALSE);
    foreach (array_values($items) as $item) {
      if (isset($item['metatag_keywords']['value'])) {
        variable_set('metatag_search_test_keywords', $item['metatag_keywords']['value']);
      }
    }
    return array_keys($items);
  }

  /**
   * @inheritdoc
   */
  public function deleteItems($ids = 'all', SearchApiIndex $index = NULL) {
  }

  /**
   * @inheritdoc
   */
  public function search(SearchApiQueryInterface $query) {
    return array(
      'result count' => 0,
      'results' => array(),
    );
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MetatagSearchTestSearchApiService::deleteItems public function @inheritdoc Overrides SearchApiServiceInterface::deleteItems
MetatagSearchTestSearchApiService::indexItems public function @inheritdoc Overrides SearchApiServiceInterface::indexItems
MetatagSearchTestSearchApiService::search public function @inheritdoc Overrides SearchApiServiceInterface::search
SearchApiAbstractService::$options protected property Direct reference to the server's $options property.
SearchApiAbstractService::$server protected property
SearchApiAbstractService::addIndex public function Implements SearchApiServiceInterface::__construct(). Overrides SearchApiServiceInterface::addIndex 1
SearchApiAbstractService::configurationForm public function Implements SearchApiServiceInterface::__construct(). Overrides SearchApiServiceInterface::configurationForm 1
SearchApiAbstractService::configurationFormSubmit public function Implements SearchApiServiceInterface::__construct(). Overrides SearchApiServiceInterface::configurationFormSubmit
SearchApiAbstractService::configurationFormValidate public function Implements SearchApiServiceInterface::__construct(). Overrides SearchApiServiceInterface::configurationFormValidate
SearchApiAbstractService::fieldsUpdated public function Implements SearchApiServiceInterface::__construct(). Overrides SearchApiServiceInterface::fieldsUpdated 1
SearchApiAbstractService::getExtraInformation public function Returns additional, service-specific information about this server.
SearchApiAbstractService::postCreate public function Implements SearchApiServiceInterface::__construct(). Overrides SearchApiServiceInterface::postCreate
SearchApiAbstractService::postUpdate public function Implements SearchApiServiceInterface::__construct(). Overrides SearchApiServiceInterface::postUpdate
SearchApiAbstractService::preDelete public function Implements SearchApiServiceInterface::__construct(). Overrides SearchApiServiceInterface::preDelete 1
SearchApiAbstractService::query public function Implements SearchApiServiceInterface::__construct(). Overrides SearchApiServiceInterface::query
SearchApiAbstractService::removeIndex public function Implements SearchApiServiceInterface::__construct(). Overrides SearchApiServiceInterface::removeIndex 1
SearchApiAbstractService::supportsFeature public function Implements SearchApiServiceInterface::__construct(). Overrides SearchApiServiceInterface::supportsFeature 1
SearchApiAbstractService::viewSettings public function Implements SearchApiServiceInterface::__construct(). Overrides SearchApiServiceInterface::viewSettings
SearchApiAbstractService::__construct public function Implements SearchApiServiceInterface::__construct(). Overrides SearchApiServiceInterface::__construct