You are here

protected function ContentImporter::buildFilepath in Commerce Demo 8

Same name and namespace in other branches
  1. 8.2 src/ContentImporter.php \Drupal\commerce_demo\ContentImporter::buildFilepath()

Builds the filepath for the given entity type's export file.

Parameters

string $entity_type_id: The entity type ID.

string $bundle: The bundle.

Return value

string The filepath.

1 call to ContentImporter::buildFilepath()
ContentImporter::importAll in src/ContentImporter.php
Imports all content for the given entity type and bundle.

File

src/ContentImporter.php, line 296

Class

ContentImporter
Defines the content importer.

Namespace

Drupal\commerce_demo

Code

protected function buildFilepath($entity_type_id, $bundle = '') {
  $filepath = $this->contentPath . '/' . $entity_type_id;
  if ($bundle) {
    $filepath .= '.' . $bundle;
  }
  $filepath .= '.yml';
  return $filepath;
}