function EntityForm::setOperation

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityForm.php \Drupal\Core\Entity\EntityForm::setOperation()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityForm.php \Drupal\Core\Entity\EntityForm::setOperation()
  3. 11.x core/lib/Drupal/Core/Entity/EntityForm.php \Drupal\Core\Entity\EntityForm::setOperation()

Overrides EntityFormInterface::setOperation

File

core/lib/Drupal/Core/Entity/EntityForm.php, line 53

Class

EntityForm
Base class for entity forms.

Namespace

Drupal\Core\Entity

Code

public function setOperation($operation) {
    // If NULL is passed, do not overwrite the operation.
    if ($operation) {
        $this->operation = $operation;
    }
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.