public function ContentExportController::getContentType in Content Export CSV 8
* Get Content Type List
File
- src/
Controller/ ContentExportController.php, line 12
Class
Namespace
Drupal\content_export_csv\ControllerCode
public function getContentType() {
$contentTypes = \Drupal::service('entity.manager')
->getStorage('node_type')
->loadMultiple();
$contentTypesList = [];
foreach ($contentTypes as $contentType) {
$contentTypesList[$contentType
->id()] = $contentType
->label();
}
return $contentTypesList;
}