You are here

public function ModerationInformation::getUnsupportedFeatures in Config Entity Revisions 8.2

Gets unsupported features for a given entity type.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type to get the unsupported features for.

Return value

array An array of unsupported features for this entity type.

Overrides ModerationInformation::getUnsupportedFeatures

File

src/ModerationInformation.php, line 239

Class

ModerationInformation
Class ModerationInformation.

Namespace

Drupal\config_entity_revisions

Code

public function getUnsupportedFeatures(EntityTypeInterface $entity_type) {
  $features = [];

  // Test if entity is publishable.
  if (!$entity_type
    ->entityClassImplements(EntityPublishedInterface::class)) {
    $features['publishing'] = $this
      ->t("@entity_type_plural_label do not support publishing statuses. For example, even after transitioning from a published workflow state to an unpublished workflow state they will still be visible to site visitors.", [
      '@entity_type_plural_label' => $entity_type
        ->getCollectionLabel(),
    ]);
  }
  return $features;
}