function InstallHelper::getNodePath
Retrieves the node path of node CSV ID saved during the import process.
Parameters
string $langcode: Current language code.
string $content_type: Current content type.
string $node_csv_id: The node's ID from the CSV file.
Return value
string Node path, or 0 if node CSV ID could not be found.
File
-
core/
profiles/ demo_umami/ modules/ demo_umami_content/ src/ InstallHelper.php, line 278
Class
- InstallHelper
- Defines a helper class for importing default content.
Namespace
Drupal\demo_umami_contentCode
protected function getNodePath($langcode, $content_type, $node_csv_id) {
if (array_key_exists($langcode, $this->nodeIdMap) && array_key_exists($content_type, $this->nodeIdMap[$langcode]) && array_key_exists($node_csv_id, $this->nodeIdMap[$langcode][$content_type])) {
return $this->nodeIdMap[$langcode][$content_type][$node_csv_id];
}
return 0;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.