You are here

public function ViewUI::set in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views_ui/src/ViewUI.php \Drupal\views_ui\ViewUI::set()
  2. 10 core/modules/views_ui/src/ViewUI.php \Drupal\views_ui\ViewUI::set()

Sets the value of a 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 ConfigEntityInterface::set

File

core/modules/views_ui/src/ViewUI.php, line 170

Class

ViewUI
Stores UI related temporary settings.

Namespace

Drupal\views_ui

Code

public function set($property_name, $value, $notify = TRUE) {
  if (property_exists($this->storage, $property_name)) {
    $this->storage
      ->set($property_name, $value);
  }
  else {
    $this->{$property_name} = $value;
  }
}