function EntityType::setFormClass
Sets a form class for a specific operation.
Parameters
string $operation: The operation to use this form class for.
string $class: The form class implementing \Drupal\Core\Entity\EntityFormInterface.
Return value
$this
Overrides EntityTypeInterface::setFormClass
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityType.php, line 527
Class
- EntityType
- Provides an implementation of an entity type and its metadata.
Namespace
Drupal\Core\EntityCode
public function setFormClass($operation, $class) {
$this->handlers['form'][$operation] = $class;
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.