You are here

public function Webform::setPropertyOverride in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Entity/Webform.php \Drupal\webform\Entity\Webform::setPropertyOverride()

Sets the value of an overridden property.

Using this methods stops a webform from being saved with the overridden property.

Parameters

string $property_name: The name of the property that should be set.

mixed $value: The value the property should be set to.

Return value

$this

Overrides WebformInterface::setPropertyOverride

File

src/Entity/Webform.php, line 1039

Class

Webform
Defines the webform entity.

Namespace

Drupal\webform\Entity

Code

public function setPropertyOverride($property_name, $value) {
  $this
    ->set($property_name, $value);
  $this
    ->setOverride();
  return $this;
}