You are here

protected function OpenApiGeneratorBase::definitionExists in OpenAPI 8

Same name and namespace in other branches
  1. 8.2 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 553

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]);
}