You are here

protected function SchemaOverviewController::getOperations in GraphQL 8.3

Provides an array of information to build a list of operation links.

Parameters

$pluginId: The plugin id.

$pluginDefinition: The plugin definition array.

Return value

array An associative array of operation link data for this list, keyed by operation name, containing the following key-value pairs:

  • title: The localized title of the operation.
  • url: An instance of \Drupal\Core\Url for the operation URL.
  • weight: The weight of this operation.
1 call to SchemaOverviewController::getOperations()
SchemaOverviewController::buildOperations in src/Controller/SchemaOverviewController.php
Builds a renderable list of operation links for a schema.

File

src/Controller/SchemaOverviewController.php, line 121

Class

SchemaOverviewController

Namespace

Drupal\graphql\Controller

Code

protected function getOperations($pluginId, $pluginDefinition) {
  $operations = $this->moduleHandler
    ->invokeAll('graphql_schema_operations', [
    $pluginId,
    $pluginDefinition,
  ]);
  $this->moduleHandler
    ->alter('graphql_schema_operations', $operations, $pluginId, $pluginDefinition);
  uasort($operations, '\\Drupal\\Component\\Utility\\SortArray::sortByWeightElement');
  return $operations;
}