You are here

protected function OpenApiGeneratorBase::definitionExists in OpenAPI 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/openapi/OpenApiGeneratorBase.php \Drupal\openapi\Plugin\openapi\OpenApiGeneratorBase::definitionExists()

Check whether a definitions exists for a key.

Parameters

string $definition_key: The definition to check.

Return value

bool TRUE if it exists.

1 call to OpenApiGeneratorBase::definitionExists()
OpenApiGeneratorBase::getDefinitionReference in src/Plugin/openapi/OpenApiGeneratorBase.php
Gets the reference to the definition in the document.

File

src/Plugin/openapi/OpenApiGeneratorBase.php, line 515

Class

OpenApiGeneratorBase
Defines base class for OpenApi Generator plugins.

Namespace

Drupal\openapi\Plugin\openapi

Code

protected function definitionExists($definition_key) {
  $definitions = $this
    ->getDefinitions();
  return isset($definitions[$definition_key]);
}