You are here

protected function PeclExtension::validateIdentifier in Markdown 8.2

Helper method for validating the definition identifier.

Parameters

\Drupal\markdown\Annotation\Identifier $id: The identifier to validate.

Overrides AnnotationObject::validateIdentifier

File

src/Annotation/PeclExtension.php, line 166

Class

PeclExtension
PeclExtension Annotation.

Namespace

Drupal\markdown\Annotation

Code

protected function validateIdentifier(Identifier $id) {
  if (!$id
    ->startsWith('ext-')) {
    throw AnnotationException::semanticalError('A PeclExtension definition must prefix its identifier with "ext-".');
  }
}