Drupal 8  8.0.2
ViewUI Class Reference
Inheritance diagram for ViewUI:

Public Member Functions

 __construct (ViewEntityInterface $storage)
 
 get ($property_name, $langcode=NULL)
 
 setStatus ($status)
 
 set ($property_name, $value, $notify=TRUE)
 
 setSyncing ($syncing)
 
 setUninstalling ($isUninstalling)
 
 isSyncing ()
 
 isUninstalling ()
 
 standardSubmit ($form, FormStateInterface $form_state)
 
 standardCancel ($form, FormStateInterface $form_state)
 
 getStandardButtons (&$form, FormStateInterface $form_state, $form_id, $name=NULL)
 
 getOverrideValues ($form, FormStateInterface $form_state)
 
 addFormToStack ($key, $display_id, $type, $id=NULL, $top=FALSE, $rebuild_keys=FALSE)
 
 submitItemAdd ($form, FormStateInterface $form_state)
 
 startQueryCapture ()
 
 endQueryCapture ()
 
 renderPreview ($display_id, $args=array())
 
 getFormProgress ()
 
 cacheSet ()
 
 isLocked ()
 
 __call ($method, $args)
 
getDisplay ($display_id)
 
 id ()
 
 uuid ()
 
 isNew ()
 
 getEntityTypeId ()
 
 bundle ()
 
 getEntityType ()
 
 createDuplicate ()
 
 delete ()
 
 save ()
 
 urlInfo ($rel= 'edit-form', array $options=[])
 
 toUrl ($rel= 'edit-form', array $options=[])
 
 link ($text=NULL, $rel= 'edit-form', array $options=[])
 
 toLink ($text=NULL, $rel= 'edit-form', array $options=[])
 
 label ()
 
 enforceIsNew ($value=TRUE)
 
 toArray ()
 
 language ()
 
 access ($operation= 'view', AccountInterface $account=NULL, $return_as_object=FALSE)
 
 enable ()
 
 disable ()
 
 status ()
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 preSave (EntityStorageInterface $storage)
 
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
 postCreate (EntityStorageInterface $storage)
 
 getExecutable ()
 
 duplicateDisplayAsType ($old_display_id, $new_display_type)
 
 mergeDefaultDisplaysOptions ()
 
 uriRelationships ()
 
 referencedEntities ()
 
 url ($rel= 'edit-form', $options=array())
 
 hasLinkTemplate ($key)
 
 calculateDependencies ()
 
 getConfigDependencyKey ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
 onDependencyRemoval (array $dependencies)
 
 getDependencies ()
 
 getCacheContexts ()
 
 getCacheTags ()
 
 getCacheMaxAge ()
 
 getTypedData ()
 
 addDisplay ($plugin_id= 'page', $title=NULL, $id=NULL)
 
 isInstallable ()
 
 setThirdPartySetting ($module, $key, $value)
 
 getThirdPartySetting ($module, $key, $default=NULL)
 
 getThirdPartySettings ($module)
 
 unsetThirdPartySetting ($module, $key)
 
 getThirdPartyProviders ()
 
 trustData ()
 
 hasTrustedData ()
 
 addCacheableDependency ($other_object)
 
 addCacheContexts (array $cache_contexts)
 
 mergeCacheMaxAge ($max_age)
 
 getCacheTagsToInvalidate ()
 
 addCacheTags (array $cache_tags)
 
- Public Member Functions inherited from ConfigEntityInterface
 get ($property_name)
 
 set ($property_name, $value)
 

Static Public Member Functions

static load ($id)
 
static loadMultiple (array $ids=NULL)
 
static create (array $values=array())
 
static preCreate (EntityStorageInterface $storage, array &$values)
 
static preDelete (EntityStorageInterface $storage, array $entities)
 
static postDelete (EntityStorageInterface $storage, array $entities)
 
static postLoad (EntityStorageInterface $storage, array &$entities)
 

Data Fields

 $editing = FALSE
 
 $changed_display
 
 $render_time
 
 $lock
 
 $changed
 
 $temporary_options
 
 $stack
 
 $live_preview
 
 $renderPreview = FALSE
 

Static Public Attributes

static $forms
 

Protected Attributes

 $storage
 
 $additionalQueries
 

Detailed Description

Stores UI related temporary settings.

Constructor & Destructor Documentation

__construct ( ViewEntityInterface  $storage)

Constructs a View UI object.

Parameters
\Drupal\views\ViewEntityInterface$storageThe View storage object to wrap.

Member Function Documentation

__call (   $method,
  $args 
)

Passes through all unknown calls onto the storage object.

access (   $operation = 'view',
AccountInterface  $account = NULL,
  $return_as_object = FALSE 
)

{Checks data value access.

Parameters
string$operationThe operation to be performed.
\Drupal\Core\Session\AccountInterface$account(optional) The user for which to check access, or NULL to check access for the current user. Defaults to NULL.
bool$return_as_object(optional) Defaults to FALSE.
Returns
bool| The access result. Returns a boolean if $return_as_object is FALSE (this is the default) and otherwise an AccessResultInterface object. When a boolean is returned, the result of AccessInterface::isAllowed() is returned, i.e. TRUE means access is explicitly allowed, FALSE means access is either explicitly forbidden or "no opinion".
}

Implements AccessibleInterface.

Referenced by ViewEditForm\renderDisplayTop().

Here is the caller graph for this function:

addCacheableDependency (   $other_object)

{Adds a dependency on an object: merges its cacheability metadata.

Parameters
\Drupal\Core\Cache\CacheableDependencyInterface | object$other_objectThe dependency. If the object implements CacheableDependencyInterface, then its cacheability metadata will be used. Otherwise, the passed in object must be assumed to be uncacheable, so max-age 0 is set.
Returns
$this
See Also
::createFromObject()
}

Implements RefinableCacheableDependencyInterface.

addCacheContexts ( array  $cache_contexts)

{Adds cache contexts.

Parameters
string[]$cache_contexts The cache contexts to be added.
Returns
$this
}

Implements RefinableCacheableDependencyInterface.

addCacheTags ( array  $cache_tags)

{Adds cache tags.

Parameters
string[]$cache_tags The cache tags to be added.
Returns
$this
}

Implements RefinableCacheableDependencyInterface.

addDisplay (   $plugin_id = 'page',
  $title = NULL,
  $id = NULL 
)

{Adds a new display handler to the view, automatically creating an ID.

Parameters
string$plugin_id(optional) The plugin type from the Views plugin annotation. Defaults to 'page'.
string$title(optional) The title of the display. Defaults to NULL.
string$id(optional) The ID to use, e.g., 'default', 'page_1', 'block_2'. Defaults to NULL.
Returns
string|bool The key to the display in $view->display, or FALSE if no plugin ID was provided.
}

Implements ViewEntityInterface.

addFormToStack (   $key,
  $display_id,
  $type,
  $id = NULL,
  $top = FALSE,
  $rebuild_keys = FALSE 
)

Add another form to the stack; clicking 'apply' will go to this form rather than closing the ajax popup.

References Html\resetSeenIds().

Referenced by ViewUI\submitItemAdd().

Here is the call graph for this function:

Here is the caller graph for this function:

bundle ( )

{Gets the bundle of the entity.

Returns
string The bundle of the entity. Defaults to the entity type ID if the entity type does not make use of different bundles.
}

Implements EntityInterface.

cacheSet ( )

Sets a cached view object in the user tempstore.

References ViewUI\getExecutable(), ViewUI\isLocked(), Drupal\service(), and t().

Referenced by ViewUI\standardCancel(), ViewUI\standardSubmit(), and ViewUI\submitItemAdd().

Here is the call graph for this function:

Here is the caller graph for this function:

calculateDependencies ( )

{Calculates dependencies and stores them in the dependency property.

Returns
$this
See Also
}

Implements ConfigEntityInterface.

static create ( array  $values = array())
static

{Constructs a new entity object, without permanently saving it.

Parameters
array$values(optional) An array of values to set, keyed by property name. If the entity type has bundles, the bundle key has to be specified.
Returns
static The entity object.
}

Implements EntityInterface.

References Entity\create().

Here is the call graph for this function:

createDuplicate ( )

{Creates a duplicate of the entity.

Returns
static A clone of $this with all identifiers unset, so saving it inserts a new entity into the storage system.
}

Implements EntityInterface.

delete ( )

{Deletes an entity permanently.

Exceptions
\Drupal\Core\Entity\EntityStorageExceptionIn case of failures an exception is thrown.
}

Implements EntityInterface.

disable ( )

{Disables the configuration entity.

Returns
$this
}

Implements ConfigEntityInterface.

duplicateDisplayAsType (   $old_display_id,
  $new_display_type 
)

{Duplicates an existing display into a new display type.For example clone to display a page display as a block display.

Parameters
string$old_display_idThe origin of the duplicated display.
string$new_display_typeThe display type of the new display.
Returns
string The display ID of the new display.
}

Implements ViewEntityInterface.

enable ( )

{Enables the configuration entity.

Returns
$this
}

Implements ConfigEntityInterface.

endQueryCapture ( )

Add the list of queries run during render to buildinfo.

See Also
ViewUI::startQueryCapture()

References Database\getLog().

Here is the call graph for this function:

enforceIsNew (   $value = TRUE)

{Enforces an entity to be new.Allows migrations to create entities with pre-defined IDs by forcing the entity to be new before saving.

Parameters
bool$value(optional) Whether the entity should be forced to be new. Defaults to TRUE.
Returns
$this
See Also
::isNew()
}

Implements EntityInterface.

get (   $property_name,
  $langcode = NULL 
)

{}

Referenced by ViewsUIController\edit(), ViewFormBase\getDisplayLabel(), ViewFormBase\getDisplayTabs(), and ViewEditForm\renderDisplayTop().

Here is the caller graph for this function:

getCacheContexts ( )

{The cache contexts associated with this object.These identify a specific variation/representation of the object.Cache contexts are tokens: placeholders that are converted to cache keys by the service. The replacement value depends on the request context (the current URL, language, and so on). They're converted before storing an object in cache.

Returns
string[] An array of cache context tokens, used to generate a cache ID.
See Also
::convertTokensToKeys()
}

Implements CacheableDependencyInterface.

getCacheMaxAge ( )

{The maximum age for which this object may be cached.

Returns
int The maximum time in seconds that this object may be cached.
}

Implements CacheableDependencyInterface.

getCacheTags ( )

{The cache tags associated with this object.When this object is modified, these cache tags will be invalidated.

Returns
string[] A set of cache tags.
}

Implements CacheableDependencyInterface.

getCacheTagsToInvalidate ( )

{Returns the cache tags that should be used to invalidate caches.This will not return additional cache tags added through addCacheTags().

Returns
string[] Set of cache tags.
See Also
::addCacheTags()
::getCacheTags()
}

Implements EntityInterface.

getConfigDependencyKey ( )

{Gets the key that is used to store configuration dependencies.

Returns
string The key to be used in configuration dependencies when storing dependencies on entities of this type.
See Also
::getConfigDependencyKey()
}

Implements EntityInterface.

getConfigDependencyName ( )

{Gets the configuration dependency name.Configuration entities can depend on content and configuration entities. They store an array of content and config dependency names in their "dependencies" key.

Returns
string The configuration dependency name.
See Also
}

Implements EntityInterface.

getConfigTarget ( )

{Gets the configuration target identifier for the entity.Used to supply the correct format for storing a reference targeting this entity in configuration.

Returns
string The configuration target identifier.
}

Implements EntityInterface.

getDependencies ( )

{Gets the configuration dependencies.

Returns
array An array of dependencies, keyed by $type.
See Also
}

Implements ConfigEntityInterface.

& getDisplay (   $display_id)

{Retrieves a specific display's configuration by reference.

Parameters
string$display_idThe display ID to retrieve, e.g., 'default', 'page_1', 'block_2'.
Returns
array A reference to the specified display configuration.
}

Implements ViewEntityInterface.

getEntityType ( )

{Gets the entity type definition.

Returns
The entity type definition.
}

Implements EntityInterface.

getEntityTypeId ( )

{Gets the ID of the type of the entity.

Returns
string The entity type ID.
}

Implements EntityInterface.

getExecutable ( )

{Gets an executable instance for this view.

Returns
A view executable instance.
}

Implements ViewEntityInterface.

Referenced by ViewEditForm\buildOptionForm(), ViewUI\cacheSet(), ViewFormBase\getDisplayTabs(), ViewEditForm\getFormBucket(), ViewFormBase\isDefaultDisplayShown(), ViewEditForm\rebuildCurrentTab(), ViewUI\standardSubmit(), and ViewUI\submitItemAdd().

Here is the caller graph for this function:

getFormProgress ( )

Get the user's current progress through the form stack.

Returns
FALSE if the user is not currently in a multiple-form stack. Otherwise, an associative array with the following keys:
  • current: The number of the current form on the stack.
  • total: The total number of forms originally on the stack.
getOriginalId ( )

{Gets the original ID.

Returns
int|string|null The original ID, or NULL if no ID was set or for entity types that do not support renames.
}

Implements EntityInterface.

getOverrideValues (   $form,
FormStateInterface  $form_state 
)

Return the was_defaulted, is_defaulted and revert state of a form.

References FormStateInterface\get(), FormStateInterface\getValue(), and FormStateInterface\hasValue().

Referenced by ViewUI\standardSubmit(), and ViewUI\submitItemAdd().

Here is the call graph for this function:

Here is the caller graph for this function:

getStandardButtons ( $form,
FormStateInterface  $form_state,
  $form_id,
  $name = NULL 
)

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.

TODO: Is the hidden op operator still here somewhere, or is that part of the docblock outdated?

References Url\fromRouteMatch(), FormStateInterface\get(), FormStateInterface\getFormObject(), Html\getUniqueId(), Drupal\routeMatch(), Drupal\service(), FormStateInterface\set(), and t().

Here is the call graph for this function:

getThirdPartyProviders ( )

{Gets the list of third parties that store information.

Returns
array The list of third parties.
}

Implements ThirdPartySettingsInterface.

getThirdPartySetting (   $module,
  $key,
  $default = NULL 
)

{Gets the value of a third-party setting.

Parameters
string$moduleThe module providing the third-party setting.
string$keyThe setting name.
mixed$defaultThe default value
Returns
mixed The value.
}

Implements ThirdPartySettingsInterface.

getThirdPartySettings (   $module)

{Gets all third-party settings of a given module.

Parameters
string$moduleThe module providing the third-party settings.
Returns
array An array of key-value pairs.
}

Implements ThirdPartySettingsInterface.

getTypedData ( )

{Gets a typed data object for this entity object.The returned typed data object wraps this entity and allows dealing with entities based on the generic typed data API.

Returns
The typed data object for this entity.
See Also
}

Implements EntityInterface.

hasLinkTemplate (   $key)

{Indicates if a link template exists for a given key.

Parameters
string$keyThe link type.
Returns
bool TRUE if the link template exists, FALSE otherwise.
}

Implements EntityInterface.

hasTrustedData ( )

{Gets whether on not the data is trusted.

Returns
bool TRUE if the configuration data is trusted, FALSE if not.
}

Implements ConfigEntityInterface.

id ( )

{Gets the identifier.

Returns
string|int|null The entity identifier, or NULL if the object does not yet have an identifier.
}

Implements EntityInterface.

Referenced by ViewEditForm\getFormBucket(), and ViewEditForm\renderDisplayTop().

Here is the caller graph for this function:

isInstallable ( )

{Checks whether this entity is installable.For example, a default view might not be installable if the base table doesn't exist.bool TRUE if the entity is installable, FALSE otherwise.}

Implements ConfigEntityInterface.

isLocked ( )

Returns whether the current view is locked.

Returns
bool TRUE if the view is locked, FALSE otherwise.

References Drupal\currentUser(), and Drupal\lock().

Referenced by ViewUI\cacheSet().

Here is the call graph for this function:

Here is the caller graph for this function:

isNew ( )

{Determines whether the entity is new.Usually an entity is new if no ID exists for it yet. However, entities may be enforced to be new with existing IDs too.

Returns
bool TRUE if the entity is new, or FALSE if the entity has already been saved.
See Also
::enforceIsNew()
}

Implements EntityInterface.

isSyncing ( )

{Returns whether this entity is being changed as part of an import process.If you are writing code that responds to a change in this entity (insert, update, delete, presave, etc.), and your code would result in a configuration change (whether related to this configuration entity, another configuration entity, or non-entity configuration) or your code would result in a change to this entity itself, you need to check and see if this entity change is part of an import process, and skip executing your code if that is the case.For example, ::postSave() adds the default body field to newly created node type configuration entities, which is a configuration change. You would not want this code to run during an import, because imported entities were already given the body field when they were originally created, and the imported configuration includes all of their currently-configured fields. On the other hand, ::preSave() and the methods it calls make sure that the storage tables are created or updated for the field storage configuration entity, which is not a configuration change, and it must be done whether due to an import or not. So, the first method should check $entity->isSyncing() and skip executing if it returns TRUE, and the second should not perform this check.

Returns
bool TRUE if the configuration entity is being created, updated, or deleted through the import process.
}

Implements ConfigEntityInterface.

Referenced by ViewUI\setSyncing().

Here is the caller graph for this function:

isUninstalling ( )

{Returns whether this entity is being changed during the uninstall process.If you are writing code that responds to a change in this entity (insert, update, delete, presave, etc.), and your code would result in a configuration change (whether related to this configuration entity, another configuration entity, or non-entity configuration) or your code would result in a change to this entity itself, you need to check and see if this entity change is part of an uninstall process, and skip executing your code if that is the case.For example, ::preDelete() prevents the API from deleting the default language. However during an uninstall of the language module it is expected that the default language should be deleted.

Returns
bool
}

Implements ConfigEntityInterface.

Referenced by ViewUI\setUninstalling().

Here is the caller graph for this function:

label ( )

{Gets the label of the entity.

Returns
string|null The label of the entity, or NULL if there is no label defined.
}

Implements EntityInterface.

Referenced by ViewsUIController\edit().

Here is the caller graph for this function:

language ( )

{Gets the language of the entity.

Returns
The language object.
}

Implements EntityInterface.

link (   $text = NULL,
  $rel = 'edit-form',
array  $options = [] 
)

{Deprecated way of generating a link to the entity. See toLink().

Parameters
string | null$text(optional) The link text for the anchor tag as a translated string. If NULL, it will use the entity's label. Defaults to NULL.
string$rel(optional) The link relationship type. Defaults to 'canonical'.
array$optionsSee ::generateFromRoute() for the available options.
Returns
string An HTML string containing a link to the entity.
Deprecated:
in Drupal 8.0.0, intended to be removed in Drupal 9.0.0 Please use toLink() instead.
See Also
::toLink
}

Implements EntityInterface.

static load (   $id)
static

{Loads an entity.

Parameters
mixed$idThe id of the entity to load.
Returns
static The entity object or NULL if there is no entity with the given ID.
}

Implements EntityInterface.

References Entity\load().

Here is the call graph for this function:

static loadMultiple ( array  $ids = NULL)
static

{Loads one or more entities.

Parameters
array$idsAn array of entity IDs, or NULL to load all entities.
Returns
static[] An array of entity objects indexed by their IDs.
}

Implements EntityInterface.

References Entity\loadMultiple().

Here is the call graph for this function:

mergeCacheMaxAge (   $max_age)

{Merges the maximum age (in seconds) with the existing maximum age.The max age will be set to the given value if it is lower than the existing value.

Parameters
int$max_ageThe max age to associate.
Returns
$this
Exceptions
\InvalidArgumentExceptionThrown if a non-integer value is supplied.
}

Implements RefinableCacheableDependencyInterface.

mergeDefaultDisplaysOptions ( )

{Add defaults to the display options.}

Implements ViewEntityInterface.

onDependencyRemoval ( array  $dependencies)

{Informs the entity that entities it depends on will be deleted.This method allows configuration entities to remove dependencies instead of being deleted themselves. Configuration entities can use this method to avoid being unnecessarily deleted during an extension uninstallation. For example, entity displays remove references to widgets and formatters if the plugin that supplies them depends on a module that is being uninstalled.If this method returns TRUE then the entity needs to be re-saved by the caller for the changes to take effect. Implementations should not save the entity.

Parameters
array$dependenciesAn array of dependencies that will be deleted keyed by dependency type. Dependency types are, for example, entity, module and theme.
Returns
bool TRUE if the entity has changed, FALSE if not.
bool TRUE if the entity has been changed as a result, FALSE if not.
See Also
::preDelete()
::uninstall()
::onDependencyRemoval()
}

Implements ConfigEntityInterface.

postCreate ( EntityStorageInterface  $storage)

{Acts on an entity after it is created but before hooks are invoked.

Parameters
\Drupal\Core\Entity\EntityStorageInterface$storageThe entity storage object.
}

Implements EntityInterface.

static postDelete ( EntityStorageInterface  $storage,
array  $entities 
)
static

{Acts on deleted entities before the delete hook is invoked.Used after the entities are deleted but before invoking the delete hook.

Parameters
\Drupal\Core\Entity\EntityStorageInterface$storageThe entity storage object.
\Drupal\Core\Entity\EntityInterface[]$entities An array of entities.
}

Implements EntityInterface.

static postLoad ( EntityStorageInterface  $storage,
array &  $entities 
)
static

{Acts on loaded entities.

Parameters
\Drupal\Core\Entity\EntityStorageInterface$storageThe entity storage object.
\Drupal\Core\Entity\EntityInterface[]$entities An array of entities.
}

Implements EntityInterface.

postSave ( EntityStorageInterface  $storage,
  $update = TRUE 
)

{Acts on a saved entity before the insert or update hook is invoked.Used after the entity is saved, but before invoking the insert or update hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed.

Parameters
\Drupal\Core\Entity\EntityStorageInterface$storageThe entity storage object.
bool$updateTRUE if the entity has been updated, or FALSE if it has been inserted.
}

Implements EntityInterface.

static preCreate ( EntityStorageInterface  $storage,
array &  $values 
)
static

{Changes the values of an entity before it is created.Load defaults for example.

Parameters
\Drupal\Core\Entity\EntityStorageInterface$storageThe entity storage object.
mixed[]$values An array of values to set, keyed by property name. If the entity type has bundles the bundle key has to be specified.
}

Implements EntityInterface.

static preDelete ( EntityStorageInterface  $storage,
array  $entities 
)
static

{Acts on entities before they are deleted and before hooks are invoked.Used before the entities are deleted and before invoking the delete hook.

Parameters
\Drupal\Core\Entity\EntityStorageInterface$storageThe entity storage object.
\Drupal\Core\Entity\EntityInterface[]$entities An array of entities.
}

Implements EntityInterface.

preSave ( EntityStorageInterface  $storage)

{Acts on an entity before the presave hook is invoked.Used before the entity is saved and before invoking the presave hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed. This is different from its counterpart in the Field API, FieldItemListInterface::preSave(), which is fired on all field translations automatically.

Todo:
Adjust existing implementations and the documentation according to https://www.drupal.org/node/2577609 to have a consistent API.
Parameters
\Drupal\Core\Entity\EntityStorageInterface$storageThe entity storage object.
See Also
::preSave()
}

Implements EntityInterface.

referencedEntities ( )

{Gets a list of entities referenced by this entity.

Returns
[] An array of entities.
}

Implements EntityInterface.

save ( )

{Saves an entity permanently.When saving existing entities, the entity is assumed to be complete, partial updates of entities are not supported.

Returns
int Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed.
Exceptions
\Drupal\Core\Entity\EntityStorageExceptionIn case of failures an exception is thrown.
}

Implements EntityInterface.

set (   $property_name,
  $value,
  $notify = TRUE 
)

{}

setOriginalId (   $id)

{Sets the original ID.

Parameters
int | string | null$idThe new ID to set as original ID. If the entity supports renames, setting NULL will prevent an update from being considered a rename.
Returns
$this
}

Implements EntityInterface.

setStatus (   $status)

{Sets the status of the configuration entity.

Parameters
bool$statusThe status of the configuration entity.
Returns
$this
}

Implements ConfigEntityInterface.

setSyncing (   $syncing)

{Sets the status of the isSyncing flag.

Parameters
bool$statusThe status of the sync flag.
Returns
$this
}

Implements ConfigEntityInterface.

References ViewUI\isSyncing().

Here is the call graph for this function:

setThirdPartySetting (   $module,
  $key,
  $value 
)

{Sets the value of a third-party setting.

Parameters
string$moduleThe module providing the third-party setting.
string$keyThe setting name.
mixed$valueThe setting value.
Returns
$this
}

Implements ThirdPartySettingsInterface.

setUninstalling (   $isUninstalling)

{}

References ViewUI\isUninstalling().

Here is the call graph for this function:

standardCancel (   $form,
FormStateInterface  $form_state 
)

Submit handler for cancel button

References ViewUI\cacheSet(), FormStateInterface\setRedirectUrl(), and ViewUI\urlInfo().

Here is the call graph for this function:

standardSubmit (   $form,
FormStateInterface  $form_state 
)

Basic submit handler applicable to all 'standard' forms.

This submit handler determines whether the user wants the submitted changes to apply to the default display or to the current display, and dispatches control appropriately.

References ViewUI\cacheSet(), FormStateInterface\get(), ViewUI\getExecutable(), FormStateInterface\getFormObject(), and ViewUI\getOverrideValues().

Here is the call graph for this function:

startQueryCapture ( )

Set up query capturing.

stores the queries that it runs, if logging is enabled.

See Also
ViewUI::endQueryCapture()

References Database\startLog().

Here is the call graph for this function:

status ( )

{Returns whether the configuration entity is enabled.Status implementations for configuration entities should follow these general rules:

  • Status does not affect the loading of entities. I.e. Disabling configuration entities should only have UI/access implications.
  • It should only take effect when a 'status' key is explicitly declared in the entity_keys info of a configuration entity's annotation data.
  • Each entity implementation (entity/controller) is responsible for checking and managing the status.
Returns
bool Whether the entity is enabled or not.
}

Implements ConfigEntityInterface.

submitItemAdd (   $form,
FormStateInterface  $form_state 
)

Submit handler for adding new item(s) to a view.

References ViewUI\addFormToStack(), ViewUI\cacheSet(), FormStateInterface\get(), ViewUI\getExecutable(), ViewExecutable\getHandlerTypes(), ViewUI\getOverrideValues(), FormStateInterface\getValue(), Views\handlerManager(), and FormStateInterface\isValueEmpty().

Here is the call graph for this function:

toArray ( )

{Gets an array of all property values.

Returns
mixed[] An array of property values, keyed by property name.
}

Implements EntityInterface.

toLink (   $text = NULL,
  $rel = 'edit-form',
array  $options = [] 
)

{Generates the HTML for a link to this entity.

Parameters
string | null$text(optional) The link text for the anchor tag as a translated string. If NULL, it will use the entity's label. Defaults to NULL.
string$rel(optional) The link relationship type. Defaults to 'canonical'.
array$optionsSee ::generateFromRoute() for the available options.
Returns
A Link to the entity.
Exceptions
\Drupal\Core\Entity\EntityMalformedException
\Drupal\Core\Entity\Exception\UndefinedLinkTemplateException
}

Implements EntityInterface.

toUrl (   $rel = 'edit-form',
array  $options = [] 
)

{Gets the URL object for the entity.The entity must have an id already. Content entities usually get their IDs by saving them.URI templates might be set in the links array in an annotation, for example:

links = {
"canonical" = "/node/{node}",
"edit-form" = "/node/{node}/edit",
"version-history" = "/node/{node}/revisions"
}

or specified in a callback function set like:

uri_callback = "comment_uri",

If the path is not set in the links array, the uri_callback function is used for setting the path. If this does not exist and the link relationship type is canonical, the path is set using the default template: entity/entityType/id.

Parameters
string$relThe link relationship type, for example: canonical or edit-form.
array$optionsSee ::generateFromRoute() for the available options.
Returns
The URL object.
Exceptions
\Drupal\Core\Entity\EntityMalformedException
\Drupal\Core\Entity\Exception\UndefinedLinkTemplateException
}

Implements EntityInterface.

trustData ( )

{Sets that the data should be trusted.If the data is trusted then dependencies will not be calculated on save and schema will not be used to cast the values. Generally this is only used during module and theme installation. Once the config entity has been saved the data will no longer be marked as trusted. This is an optimization for creation of configuration during installation.

Returns
$this
See Also
::createConfiguration()
}

Implements ConfigEntityInterface.

unsetThirdPartySetting (   $module,
  $key 
)

{Unsets a third-party setting.

Parameters
string$moduleThe module providing the third-party setting.
string$keyThe setting name.
Returns
mixed The value.
}

Implements ThirdPartySettingsInterface.

uriRelationships ( )

{Gets a list of URI relationships supported by this entity.

Returns
string[] An array of link relationships supported by this entity.
}

Implements EntityInterface.

url (   $rel = 'edit-form',
  $options = array() 
)

{Gets the public URL for this entity.

Parameters
string$relThe link relationship type, for example: canonical or edit-form.
array$optionsSee ::generateFromRoute() for the available options.
Returns
string The URL for this entity.
Deprecated:
in Drupal 8.0.0, intended to be removed in Drupal 9.0.0 Please use toUrl() instead.
See Also
::toUrl
}

Implements EntityInterface.

Referenced by ViewEditForm\renderDisplayTop().

Here is the caller graph for this function:

urlInfo (   $rel = 'edit-form',
array  $options = [] 
)

{Gets the URL object for the entity.

Parameters
string$relThe link relationship type, for example: canonical or edit-form.
array$optionsSee ::generateFromRoute() for the available options.
Returns
The URL object.
Deprecated:
in Drupal 8.0.0, intended to be removed in Drupal 9.0.0 Use ::toUrl() instead.
See Also
::toUrl
}

Implements EntityInterface.

Referenced by ViewFormBase\getDisplayTabs(), ViewEditForm\renderDisplayTop(), and ViewUI\standardCancel().

Here is the caller graph for this function:

uuid ( )

{Gets the entity UUID (Universally Unique Identifier).The UUID is guaranteed to be unique and can be used to identify an entity across multiple systems.

Returns
string|null The UUID of the entity, or NULL if the entity does not have one.
}

Implements EntityInterface.

Field Documentation

$forms
static
Initial value:
= array(
'add-handler' => '\Drupal\views_ui\Form\Ajax\AddItem',
'analyze' => '\Drupal\views_ui\Form\Ajax\Analyze',
'handler' => '\Drupal\views_ui\Form\Ajax\ConfigHandler',
'handler-extra' => '\Drupal\views_ui\Form\Ajax\ConfigHandlerExtra',
'handler-group' => '\Drupal\views_ui\Form\Ajax\ConfigHandlerGroup',
'display' => '\Drupal\views_ui\Form\Ajax\Display',
'edit-details' => '\Drupal\views_ui\Form\Ajax\EditDetails',
'rearrange' => '\Drupal\views_ui\Form\Ajax\Rearrange',
'rearrange-filter' => '\Drupal\views_ui\Form\Ajax\RearrangeFilter',
'reorder-displays' => '\Drupal\views_ui\Form\Ajax\ReorderDisplays',
)

The documentation for this class was generated from the following file: