lunr-8.x-1.0/lunr.module

lunr.module
<?php

/**
 * @file
 * Contains hook implementations for the Lunr module.
 */

use Drupal\Core\Entity\EntityInterface;
use Drupal\lunr\LunrSearchInterface;

/**
 * Implements hook_entity_operation().
 */
function lunr_entity_operation(EntityInterface $entity) {
  $operations = [];
  if ($entity instanceof LunrSearchInterface) {
    $operations['index'] = [
      'title' => t('Index'),
      'url' => $entity->toUrl('index'),
      'weight' => 50,
    ];
  }
  return $operations;
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc