You are here

public function GetServices::checkAvailablity in Simple Node Importer 8

File

src/Services/GetServices.php, line 90

Class

GetServices

Namespace

Drupal\simple_node_importer\Services

Code

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