// Get the temp store for this variable if it needs one. Attempt to load the
// view from the temp store, synchronize its status with the existing view,
// and store the lock metadata.
$store =
$this->tempStoreFactory->
get('views'
);
if ($view =
$store->
get($value)) { if ($entity->
status()) { $view->
enable();
} else { $view->
disable();
} $view->
setLock($store->
getMetadata($value));
} // Otherwise, decorate the existing view for use in the UI.
else { $view =
new ViewUI($entity);
} return $view;
} /**
* {@inheritdoc}
*/