Same name and namespace in other branches
  1. 2.x src/EntityCloneSettingsManager.php \Drupal\entity_clone\EntityCloneSettingsManager::getContentEntityTypes()

Get all content entity types.

Return value

\Drupal\Core\Entity\ContentEntityTypeInterface[] An array containing all content entity types.

Fichier

src/EntityCloneSettingsManager.php, line 66

Classe

EntityCloneSettingsManager
Manage entity clone configuration.

Namespace

Drupal\entity_clone

Code

public function getContentEntityTypes() {
    $definitions = $this->entityTypeManager
        ->getDefinitions();
    $ret = [];
    foreach ($definitions as $machine => $type) {
        if ($type instanceof ContentEntityTypeInterface) {
            $ret[$machine] = $type;
        }
    }
    return $ret;
}