You are here

public function PluginDefinition::setClass in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/Plugin/Definition/PluginDefinition.php \Drupal\Component\Plugin\Definition\PluginDefinition::setClass()
  2. 9 core/lib/Drupal/Component/Plugin/Definition/PluginDefinition.php \Drupal\Component\Plugin\Definition\PluginDefinition::setClass()

Sets the class.

Parameters

string $class: A fully qualified class name.

Return value

static

Throws

\InvalidArgumentException If the class is invalid.

Overrides PluginDefinitionInterface::setClass

1 call to PluginDefinition::setClass()
EntityType::setClass in core/lib/Drupal/Core/Entity/EntityType.php
Sets the class.
2 methods override PluginDefinition::setClass()
CKEditor5PluginDefinition::setClass in core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php
Sets the class.
EntityType::setClass in core/lib/Drupal/Core/Entity/EntityType.php
Sets the class.

File

core/lib/Drupal/Component/Plugin/Definition/PluginDefinition.php, line 41

Class

PluginDefinition
Provides object-based plugin definitions.

Namespace

Drupal\Component\Plugin\Definition

Code

public function setClass($class) {
  $this->class = $class;
  return $this;
}