You are here

protected function PersistedQueriesForm::getAllPersistedQueryPlugins in GraphQL 8.4

Returns an array with all the available persisted query plugins.

Return value

\Drupal\graphql\Plugin\PersistedQueryPluginInterface[]

2 calls to PersistedQueriesForm::getAllPersistedQueryPlugins()
PersistedQueriesForm::form in src/Form/PersistedQueriesForm.php
Gets the actual form array to be built.
PersistedQueriesForm::submitForm in src/Form/PersistedQueriesForm.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…

File

src/Form/PersistedQueriesForm.php, line 200

Class

PersistedQueriesForm
Admin form to set up persisted GraphQL queries.

Namespace

Drupal\graphql\Form

Code

protected function getAllPersistedQueryPlugins() {
  $plugins = [];
  foreach ($this->persistedQueryPluginManager
    ->getDefinitions() as $id => $definition) {
    $plugins[$id] = $this->persistedQueryPluginManager
      ->createInstance($id);
  }
  return $plugins;
}