You are here

public function CKEditor5PluginDefinition::getConditions in Drupal 10

Gets the list of conditions to enable this plugin.

Return value

array An array of conditions.

Throws

\LogicException When called on a plugin definition that has no conditions.

See also

\Drupal\ckeditor5\Annotation\DrupalAspectsOfCKEditor5Plugin::$conditions

File

core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php, line 345

Class

CKEditor5PluginDefinition
Provides an implementation of a CKEditor 5 plugin definition.

Namespace

Drupal\ckeditor5\Plugin

Code

public function getConditions() : array {
  if (!$this
    ->hasConditions()) {
    throw new \LogicException('::getConditions() should only be called if ::hasConditions() returns TRUE.');
  }
  return $this->drupal['conditions'];
}