You are here

public function EntityHandlerBase::getForbiddenFields in CMS Content Sync 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/EntityHandlerBase.php \Drupal\cms_content_sync\Plugin\EntityHandlerBase::getForbiddenFields()
  2. 2.1.x src/Plugin/EntityHandlerBase.php \Drupal\cms_content_sync\Plugin\EntityHandlerBase::getForbiddenFields()

Provide a list of fields that are not allowed to be pushed or pulled. These fields typically contain all label fields that are pushed separately anyway (we don't want to set IDs and revision IDs of entities for example, but only use the UUID for references).

Return value

string[]

Overrides EntityHandlerInterface::getForbiddenFields

5 calls to EntityHandlerBase::getForbiddenFields()
DefaultConfigEntityHandler::pull in src/Plugin/cms_content_sync/entity_handler/DefaultConfigEntityHandler.php
Pull the remote entity.
DefaultContentEntityHandler::getForbiddenFields in src/Plugin/cms_content_sync/entity_handler/DefaultContentEntityHandler.php
Provide a list of fields that are not allowed to be pushed or pulled. These fields typically contain all label fields that are pushed separately anyway (we don't want to set IDs and revision IDs of entities for example, but only use the UUID for…
DefaultFieldCollectionItemHandler::getForbiddenFields in src/Plugin/cms_content_sync/entity_handler/DefaultFieldCollectionItemHandler.php
Provide a list of fields that are not allowed to be pushed or pulled. These fields typically contain all label fields that are pushed separately anyway (we don't want to set IDs and revision IDs of entities for example, but only use the UUID for…
DefaultMediaHandler::getForbiddenFields in src/Plugin/cms_content_sync/entity_handler/DefaultMediaHandler.php
Provide a list of fields that are not allowed to be pushed or pulled. These fields typically contain all label fields that are pushed separately anyway (we don't want to set IDs and revision IDs of entities for example, but only use the UUID for…
DefaultTaxonomyHandler::getForbiddenFields in src/Plugin/cms_content_sync/entity_handler/DefaultTaxonomyHandler.php
Provide a list of fields that are not allowed to be pushed or pulled. These fields typically contain all label fields that are pushed separately anyway (we don't want to set IDs and revision IDs of entities for example, but only use the UUID for…
4 methods override EntityHandlerBase::getForbiddenFields()
DefaultContentEntityHandler::getForbiddenFields in src/Plugin/cms_content_sync/entity_handler/DefaultContentEntityHandler.php
Provide a list of fields that are not allowed to be pushed or pulled. These fields typically contain all label fields that are pushed separately anyway (we don't want to set IDs and revision IDs of entities for example, but only use the UUID for…
DefaultFieldCollectionItemHandler::getForbiddenFields in src/Plugin/cms_content_sync/entity_handler/DefaultFieldCollectionItemHandler.php
Provide a list of fields that are not allowed to be pushed or pulled. These fields typically contain all label fields that are pushed separately anyway (we don't want to set IDs and revision IDs of entities for example, but only use the UUID for…
DefaultMediaHandler::getForbiddenFields in src/Plugin/cms_content_sync/entity_handler/DefaultMediaHandler.php
Provide a list of fields that are not allowed to be pushed or pulled. These fields typically contain all label fields that are pushed separately anyway (we don't want to set IDs and revision IDs of entities for example, but only use the UUID for…
DefaultTaxonomyHandler::getForbiddenFields in src/Plugin/cms_content_sync/entity_handler/DefaultTaxonomyHandler.php
Provide a list of fields that are not allowed to be pushed or pulled. These fields typically contain all label fields that are pushed separately anyway (we don't want to set IDs and revision IDs of entities for example, but only use the UUID for…

File

src/Plugin/EntityHandlerBase.php, line 247

Class

EntityHandlerBase
Common base class for entity handler plugins.

Namespace

Drupal\cms_content_sync\Plugin

Code

public function getForbiddenFields() {

  /**
   * @var \Drupal\Core\Entity\EntityTypeInterface $entity_type_entity
   */
  $entity_type_entity = \Drupal::service('entity_type.manager')
    ->getStorage($this->entityTypeName)
    ->getEntityType();
  return [
    // These basic fields are already taken care of, so we ignore them
    // here.
    $entity_type_entity
      ->getKey('id'),
    $entity_type_entity
      ->getKey('revision'),
    $entity_type_entity
      ->getKey('bundle'),
    $entity_type_entity
      ->getKey('uuid'),
    $entity_type_entity
      ->getKey('label'),
    // These are not relevant or misleading when synchronized.
    'revision_default',
    'revision_translation_affected',
    'content_translation_outdated',
  ];
}