You are here

public function ViewUI::__set in Drupal 8

File

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

Class

ViewUI
Stores UI related temporary settings.

Namespace

Drupal\views_ui

Code

public function __set($name, $value) {
  if ($name === 'lock') {
    @trigger_error('Using the "lock" public property of a View is deprecated in Drupal 8.7.0 and will not be allowed in Drupal 9.0.0. Use \\Drupal\\views_ui\\ViewUI::setLock() instead. See https://www.drupal.org/node/3025869.', E_USER_DEPRECATED);
    if ($value instanceof \stdClass && property_exists($value, 'owner') && property_exists($value, 'updated')) {
      $value = new Lock($value->owner, $value->updated);
    }
    $this
      ->setLock($value);
  }
  else {
    $this->{$name} = $value;
  }
}