Drupal 8  8.0.2
ViewsEntitySchemaSubscriber Class Reference
Inheritance diagram for ViewsEntitySchemaSubscriber:

Public Member Functions

 __construct (EntityManagerInterface $entity_manager)
 
- Public Member Functions inherited from EntityTypeListenerInterface
 onEntityTypeCreate (EntityTypeInterface $entity_type)
 
 onEntityTypeUpdate (EntityTypeInterface $entity_type, EntityTypeInterface $original)
 
 onEntityTypeDelete (EntityTypeInterface $entity_type)
 

Static Public Member Functions

static getSubscribedEvents ()
 

Data Fields

const BASE_TABLE_RENAME = 0
 
const DATA_TABLE_RENAME = 1
 
const DATA_TABLE_ADDITION = 2
 
const DATA_TABLE_REMOVAL = 3
 
const REVISION_TABLE_RENAME = 4
 
const REVISION_TABLE_ADDITION = 5
 
const REVISION_TABLE_REMOVAL = 6
 
const REVISION_DATA_TABLE_RENAME = 7
 
const REVISION_DATA_TABLE_ADDITION = 8
 
const REVISION_DATA_TABLE_REMOVAL = 9
 

Protected Member Functions

 processHandlers (array $all_views, callable $process)
 
 baseTableRename ($all_views, $entity_type_id, $old_base_table, $new_base_table)
 
 dataTableRename ($all_views, $entity_type_id, $old_data_table, $new_data_table)
 
 dataTableRemoval ($all_views, $entity_type_id, $old_data_table, $base_table)
 
 revisionRemoval ($all_views, EntityTypeInterface $original)
 

Protected Attributes

 $entityManager
 

Detailed Description

Reacts to changes on entity types to update all views entities.

Constructor & Destructor Documentation

__construct ( EntityManagerInterface  $entity_manager)

Constructs a ViewsEntitySchemaSubscriber.

Parameters
\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager.

References Drupal\entityManager().

Here is the call graph for this function:

Member Function Documentation

baseTableRename (   $all_views,
  $entity_type_id,
  $old_base_table,
  $new_base_table 
)
protected

Updates views if a base table is renamed.

Parameters
\Drupal\views\Entity\View[]$all_views All views.
string$entity_type_idThe entity type ID.
string$old_base_tableThe old base table name.
string$new_base_tableThe new base table name.

References ViewsEntitySchemaSubscriber\processHandlers().

Here is the call graph for this function:

dataTableRemoval (   $all_views,
  $entity_type_id,
  $old_data_table,
  $base_table 
)
protected

Updates views if a data table is removed.

Parameters
\Drupal\views\Entity\View[]$all_views All views.
string$entity_type_idThe entity type ID.
string$old_data_tableThe name of the previous existing data table.
string$base_tableThe name of the base table.

References ViewsEntitySchemaSubscriber\processHandlers().

Here is the call graph for this function:

dataTableRename (   $all_views,
  $entity_type_id,
  $old_data_table,
  $new_data_table 
)
protected

Updates views if a data table is renamed.

Parameters
\Drupal\views\Entity\View[]$all_views All views.
string$entity_type_idThe entity type ID.
string$old_data_tableThe old data table name.
string$new_data_tableThe new data table name.

References ViewsEntitySchemaSubscriber\processHandlers().

Here is the call graph for this function:

static getSubscribedEvents ( )
static

{}

processHandlers ( array  $all_views,
callable  $process 
)
protected

Applies a callable onto all handlers of all passed in views.

Parameters
\Drupal\views\Entity\View[]$all_views All views entities.
callable$processA callable which retrieves a handler config array.

References Views\getHandlerTypes().

Referenced by ViewsEntitySchemaSubscriber\baseTableRename(), ViewsEntitySchemaSubscriber\dataTableRemoval(), and ViewsEntitySchemaSubscriber\dataTableRename().

Here is the call graph for this function:

Here is the caller graph for this function:

revisionRemoval (   $all_views,
EntityTypeInterface  $original 
)
protected

Updates views if revision support is removed

Parameters
\Drupal\views\Entity\View[]$all_views All views.
\Drupal\Core\Entity\EntityTypeInterface$originalThe origin entity type.

References EntityTypeInterface\getRevisionDataTable(), and EntityTypeInterface\getRevisionTable().

Here is the call graph for this function:

Field Documentation

const BASE_TABLE_RENAME = 0

Indicates that a base table got renamed.

const DATA_TABLE_ADDITION = 2

Indicates that a data table got added.

const DATA_TABLE_REMOVAL = 3

Indicates that a data table got removed.

const DATA_TABLE_RENAME = 1

Indicates that a data table got renamed.

const REVISION_DATA_TABLE_ADDITION = 8

Indicates that a revision data table got added.

const REVISION_DATA_TABLE_REMOVAL = 9

Indicates that a revision data table got removed.

const REVISION_DATA_TABLE_RENAME = 7

Indicates that a revision data table got renamed.

const REVISION_TABLE_ADDITION = 5

Indicates that a revision table got added.

const REVISION_TABLE_REMOVAL = 6

Indicates that a revision table got removed.

const REVISION_TABLE_RENAME = 4

Indicates that a revision table got renamed.


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