You are here

protected function Importer::getVertex in Default Content for D8 8

Same name and namespace in other branches
  1. 2.0.x src/Importer.php \Drupal\default_content\Importer::getVertex()

Returns a vertex object for a given item link.

Ensures that the same object is returned for the same item link.

Parameters

string $item_link: The item link as a string.

Return value

object The vertex object.

1 call to Importer::getVertex()
Importer::importContent in src/Importer.php
Imports default content from a given module.

File

src/Importer.php, line 251

Class

Importer
A service for handling import of default content.

Namespace

Drupal\default_content

Code

protected function getVertex($item_link) {
  if (!isset($this->vertexes[$item_link])) {
    $this->vertexes[$item_link] = (object) [
      'id' => $item_link,
    ];
  }
  return $this->vertexes[$item_link];
}