You are here

public static function WebformContentCreatorUtilities::getAllContentTypes in Webform Content Creator 3.x

Same name and namespace in other branches
  1. 8 src/WebformContentCreatorUtilities.php \Drupal\webform_content_creator\WebformContentCreatorUtilities::getAllContentTypes()

Get all content type entities.

Return value

array All content type entities.

1 call to WebformContentCreatorUtilities::getAllContentTypes()
WebformContentCreatorUtilities::getFormattedContentTypes in src/WebformContentCreatorUtilities.php
Get an associative array with content type ids and respective labels.

File

src/WebformContentCreatorUtilities.php, line 242

Class

WebformContentCreatorUtilities
Provides useful functions required in Webform content creator module.

Namespace

Drupal\webform_content_creator

Code

public static function getAllContentTypes() {
  $ids = self::getAllContentTypeIds();
  return \Drupal::entityTypeManager()
    ->getStorage('node_type')
    ->loadMultiple(array_keys($ids));
}