You are here

public function GetServices::getContentTypeList in Simple Node Importer 8

File

src/Services/GetServices.php, line 41

Class

GetServices

Namespace

Drupal\simple_node_importer\Services

Code

public function getContentTypeList() {
  $nodeTypes = NodeType::loadMultiple();
  foreach ($nodeTypes as $key => $value) {
    $content_types[$key] = $value
      ->get('name');
  }
  if (isset($content_types['simple_node'])) {
    unset($content_types['simple_node']);
  }
  return $content_types;
}