public function IndexListBuilder::getDefaultOperations in Search API 8
Gets this list's default operations.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity the operations are for.
Return value
array The array structure is identical to the return value of self::getOperations().
Overrides ConfigEntityListBuilder::getDefaultOperations
File
- src/
IndexListBuilder.php, line 133
Class
- IndexListBuilder
- Builds a listing of search index entities.
Namespace
Drupal\search_apiCode
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
if ($entity instanceof IndexInterface) {
$route_parameters['search_api_index'] = $entity
->id();
$operations['fields'] = [
'title' => $this
->t('Fields'),
'weight' => 20,
'url' => new Url('entity.search_api_index.fields', $route_parameters),
];
$operations['processors'] = [
'title' => $this
->t('Processors'),
'weight' => 30,
'url' => new Url('entity.search_api_index.processors', $route_parameters),
];
}
return $operations;
}