You are here

class ViewsRevisionsUI in Config Entity Revisions 8

Same name and namespace in other branches
  1. 1.x modules/views_revisions/src/ViewsRevisionsUI.php \Drupal\views_revisions\ViewsRevisionsUI

Hierarchy

Expanded class hierarchy of ViewsRevisionsUI

2 files declare their use of ViewsRevisionsUI
ViewsRevisionsConverter.php in modules/views_revisions/src/ParamConverter/ViewsRevisionsConverter.php
views_revisions.module in modules/views_revisions/views_revisions.module

File

modules/views_revisions/src/ViewsRevisionsUI.php, line 10

Namespace

Drupal\views_revisions
View source
class ViewsRevisionsUI extends ViewUI {
  use ViewsRevisionsConfigTrait, ConfigEntityRevisionsConfigTrait;

  /**
   * Sets a cached view object in the shared tempstore.
   */
  public function cacheSet() {
    if ($this
      ->isLocked()) {
      \Drupal::messenger()
        ->addError('Changes cannot be made to a locked view.');
      return;
    }

    // Let any future object know that this view has changed.
    $this->changed = TRUE;
    $executable = $this
      ->getExecutable();
    if (isset($executable->current_display)) {

      // Add the knowledge of the changed display, too.
      $this->changed_display[$executable->current_display] = TRUE;
      $executable->current_display = NULL;
    }

    // Unset handlers. We don't want to write these into the cache.
    $executable->display_handler = NULL;
    $executable->default_display = NULL;
    $executable->query = NULL;
    $executable->displayHandlers = NULL;
    $revId = $this
      ->get('storage')
      ->get('loadedRevisionId');
    $cacheId = $revId ? $this
      ->id() . '-' . $revId : $this
      ->id();
    $this->storage->entityTypeManager = NULL;
    $this->entityTypeManager = NULL;
    \Drupal::service('tempstore.shared')
      ->get('views')
      ->set($cacheId, $this);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigEntityRevisionsStorageTrait::admin_permission public function
ConfigEntityRevisionsStorageTrait::config_entity_name public function
ConfigEntityRevisionsStorageTrait::content_entity_type public function
ConfigEntityRevisionsStorageTrait::content_parameter_name public function
ConfigEntityRevisionsStorageTrait::content_parent_reference_field public function
ConfigEntityRevisionsStorageTrait::has_canonical_url public function
ConfigEntityRevisionsStorageTrait::has_own_content public function
ConfigEntityRevisionsStorageTrait::module_name public function
ConfigEntityRevisionsStorageTrait::revisions_entity_name public function
ConfigEntityRevisionsStorageTrait::setting_name public function
ConfigEntityRevisionsStorageTrait::title public function
ViewsRevisionsConfigTrait::$constants private property
ViewsRevisionsConfigTrait::revisioned_entity public function Get the entity that actually has revisions.
ViewsRevisionsUI::cacheSet public function Sets a cached view object in the shared tempstore. Overrides ViewUI::cacheSet
ViewUI::$additionalQueries protected property Stores a list of database queries run beside the main one from views.
ViewUI::$changed public property If this view has been changed.
ViewUI::$changed_display public property Stores an array of displays that have been changed.
ViewUI::$editing public property Indicates if a view is currently being edited.
ViewUI::$forms public static property Contains an array of form keys and their respective classes.
ViewUI::$isSyncing private property Whether the config is being created, updated or deleted through the import process.
ViewUI::$isUninstalling private property Whether the config is being deleted through the uninstall process.
ViewUI::$live_preview public property Is the view run in a context of the preview in the admin interface.
ViewUI::$lock private property If this view is locked for editing.
ViewUI::$renderPreview public property
ViewUI::$render_time public property How long the view takes to render in microseconds.
ViewUI::$stack public property Stores a stack of UI forms to display.
ViewUI::$storage protected property The View storage object.
ViewUI::$temporary_options public property Stores options temporarily while editing.
ViewUI::access public function Checks data value access. Overrides AccessibleInterface::access
ViewUI::addCacheableDependency public function Adds a dependency on an object: merges its cacheability metadata. Overrides RefinableCacheableDependencyInterface::addCacheableDependency
ViewUI::addCacheContexts public function Adds cache contexts. Overrides RefinableCacheableDependencyInterface::addCacheContexts
ViewUI::addCacheTags public function Adds cache tags. Overrides RefinableCacheableDependencyInterface::addCacheTags
ViewUI::addDisplay public function Adds a new display handler to the view, automatically creating an ID. Overrides ViewEntityInterface::addDisplay
ViewUI::addFormToStack public function Add another form to the stack; clicking 'apply' will go to this form rather than closing the ajax popup.
ViewUI::bundle public function Gets the bundle of the entity. Overrides EntityInterface::bundle
ViewUI::calculateDependencies public function Calculates dependencies and stores them in the dependency property. Overrides ConfigEntityInterface::calculateDependencies
ViewUI::create public static function Constructs a new entity object, without permanently saving it. Overrides EntityInterface::create
ViewUI::createDuplicate public function Creates a duplicate of the entity. Overrides EntityInterface::createDuplicate
ViewUI::delete public function Deletes an entity permanently. Overrides EntityInterface::delete
ViewUI::disable public function Disables the configuration entity. Overrides ConfigEntityInterface::disable
ViewUI::duplicateDisplayAsType public function Duplicates an existing display into a new display type. Overrides ViewEntityInterface::duplicateDisplayAsType
ViewUI::enable public function Enables the configuration entity. Overrides ConfigEntityInterface::enable
ViewUI::endQueryCapture public function Add the list of queries run during render to buildinfo.
ViewUI::enforceIsNew public function Enforces an entity to be new. Overrides EntityInterface::enforceIsNew
ViewUI::get public function Returns the value of a property. Overrides ConfigEntityInterface::get
ViewUI::getCacheContexts public function The cache contexts associated with this object. Overrides CacheableDependencyInterface::getCacheContexts
ViewUI::getCacheMaxAge public function The maximum age for which this object may be cached. Overrides CacheableDependencyInterface::getCacheMaxAge
ViewUI::getCacheTags public function The cache tags associated with this object. Overrides CacheableDependencyInterface::getCacheTags
ViewUI::getCacheTagsToInvalidate public function Returns the cache tags that should be used to invalidate caches. Overrides EntityInterface::getCacheTagsToInvalidate
ViewUI::getConfigDependencyKey public function Gets the key that is used to store configuration dependencies. Overrides EntityInterface::getConfigDependencyKey
ViewUI::getConfigDependencyName public function Gets the configuration dependency name. Overrides EntityInterface::getConfigDependencyName
ViewUI::getConfigTarget public function Gets the configuration target identifier for the entity. Overrides EntityInterface::getConfigTarget
ViewUI::getDependencies public function Gets the configuration dependencies. Overrides ConfigEntityInterface::getDependencies
ViewUI::getDisplay public function Retrieves a specific display's configuration by reference. Overrides ViewEntityInterface::getDisplay
ViewUI::getEntityType public function Gets the entity type definition. Overrides EntityInterface::getEntityType
ViewUI::getEntityTypeId public function Gets the ID of the type of the entity. Overrides EntityInterface::getEntityTypeId
ViewUI::getExecutable public function Gets an executable instance for this view. Overrides ViewEntityInterface::getExecutable
ViewUI::getFormProgress public function Get the user's current progress through the form stack.
ViewUI::getLock public function Gets the lock on this View.
ViewUI::getOriginalId public function Gets the original ID. Overrides EntityInterface::getOriginalId
ViewUI::getOverrideValues public function Return the was_defaulted, is_defaulted and revert state of a form.
ViewUI::getStandardButtons public function Provide a standard set of Apply/Cancel/OK buttons for the forms. Also provide a hidden op operator because the forms plugin doesn't seem to properly provide which button was clicked.
ViewUI::getThirdPartyProviders public function Gets the list of third parties that store information. Overrides ThirdPartySettingsInterface::getThirdPartyProviders
ViewUI::getThirdPartySetting public function Gets the value of a third-party setting. Overrides ThirdPartySettingsInterface::getThirdPartySetting
ViewUI::getThirdPartySettings public function Gets all third-party settings of a given module. Overrides ThirdPartySettingsInterface::getThirdPartySettings
ViewUI::getTypedData public function Gets a typed data object for this entity object. Overrides EntityInterface::getTypedData
ViewUI::hasLinkTemplate public function Indicates if a link template exists for a given key. Overrides EntityInterface::hasLinkTemplate
ViewUI::hasTrustedData public function Gets whether on not the data is trusted. Overrides ConfigEntityInterface::hasTrustedData
ViewUI::id public function Gets the identifier. Overrides EntityInterface::id
ViewUI::isInstallable public function Checks whether this entity is installable. Overrides ConfigEntityInterface::isInstallable
ViewUI::isLocked public function Returns whether the current view is locked.
ViewUI::isNew public function Determines whether the entity is new. Overrides EntityInterface::isNew
ViewUI::isSyncing public function Returns whether this entity is being changed as part of a synchronization. Overrides SynchronizableInterface::isSyncing
ViewUI::isUninstalling public function Returns whether this entity is being changed during the uninstall process. Overrides ConfigEntityInterface::isUninstalling
ViewUI::label public function Gets the label of the entity. Overrides EntityInterface::label
ViewUI::language public function Gets the language of the entity. Overrides EntityInterface::language
ViewUI::link public function Deprecated way of generating a link to the entity. See toLink(). Overrides EntityInterface::link
ViewUI::load public static function Loads an entity. Overrides EntityInterface::load
ViewUI::loadMultiple public static function Loads one or more entities. Overrides EntityInterface::loadMultiple
ViewUI::mergeCacheMaxAge public function Merges the maximum age (in seconds) with the existing maximum age. Overrides RefinableCacheableDependencyInterface::mergeCacheMaxAge
ViewUI::mergeDefaultDisplaysOptions public function Add defaults to the display options. Overrides ViewEntityInterface::mergeDefaultDisplaysOptions
ViewUI::onDependencyRemoval public function Informs the entity that entities it depends on will be deleted. Overrides ConfigEntityInterface::onDependencyRemoval
ViewUI::postCreate public function Acts on a created entity before hooks are invoked. Overrides EntityInterface::postCreate
ViewUI::postDelete public static function Acts on deleted entities before the delete hook is invoked. Overrides EntityInterface::postDelete
ViewUI::postLoad public static function Acts on loaded entities. Overrides EntityInterface::postLoad
ViewUI::postSave public function Acts on a saved entity before the insert or update hook is invoked. Overrides EntityInterface::postSave
ViewUI::preCreate public static function Changes the values of an entity before it is created. Overrides EntityInterface::preCreate
ViewUI::preDelete public static function Acts on entities before they are deleted and before hooks are invoked. Overrides EntityInterface::preDelete
ViewUI::preSave public function Acts on an entity before the presave hook is invoked. Overrides EntityInterface::preSave
ViewUI::referencedEntities public function Gets a list of entities referenced by this entity. Overrides EntityInterface::referencedEntities
ViewUI::renderPreview public function
ViewUI::save public function Saves an entity permanently. Overrides EntityInterface::save
ViewUI::set public function Sets the value of a property. Overrides ConfigEntityInterface::set
ViewUI::setLock public function Sets a lock on this View.
ViewUI::setOriginalId public function Sets the original ID. Overrides EntityInterface::setOriginalId
ViewUI::setStatus public function Sets the status of the configuration entity. Overrides ConfigEntityInterface::setStatus
ViewUI::setSyncing public function Sets the status of the synchronization flag. Overrides SynchronizableInterface::setSyncing
ViewUI::setThirdPartySetting public function Sets the value of a third-party setting. Overrides ThirdPartySettingsInterface::setThirdPartySetting
ViewUI::setUninstalling public function
ViewUI::standardCancel public function Submit handler for cancel button
ViewUI::standardSubmit public function Basic submit handler applicable to all 'standard' forms.
ViewUI::startQueryCapture public function Set up query capturing.
ViewUI::status public function Returns whether the configuration entity is enabled. Overrides ConfigEntityInterface::status
ViewUI::submitItemAdd public function Submit handler for adding new item(s) to a view.
ViewUI::toArray public function Gets an array of all property values. Overrides EntityInterface::toArray
ViewUI::toLink public function Generates the HTML for a link to this entity. Overrides EntityInterface::toLink
ViewUI::toUrl public function Gets the URL object for the entity. Overrides EntityInterface::toUrl
ViewUI::trustData public function Sets that the data should be trusted. Overrides ConfigEntityInterface::trustData
ViewUI::unsetLock public function Unsets the lock on this View.
ViewUI::unsetThirdPartySetting public function Unsets a third-party setting. Overrides ThirdPartySettingsInterface::unsetThirdPartySetting
ViewUI::uriRelationships public function Gets a list of URI relationships supported by this entity. Overrides EntityInterface::uriRelationships
ViewUI::url public function Gets the public URL for this entity. Overrides EntityInterface::url
ViewUI::urlInfo public function Gets the URL object for the entity. Overrides EntityInterface::urlInfo
ViewUI::uuid public function Gets the entity UUID (Universally Unique Identifier). Overrides EntityInterface::uuid
ViewUI::__call public function Passes through all unknown calls onto the storage object.
ViewUI::__construct public function Constructs a View UI object.
ViewUI::__get public function
ViewUI::__set public function