You are here

private function OverrideController::importFolder in Commerce Smart Importer 8

Finds import folder.

1 call to OverrideController::importFolder()
OverrideController::overrideValue in src/Controller/OverrideController.php
Main function for overriding.

File

src/Controller/OverrideController.php, line 94

Class

OverrideController
Controller used to override values in import.

Namespace

Drupal\commerce_smart_importer\Controller

Code

private function importFolder($import_name) {
  $dir = scandir(CommerceSmartImporterConstants::TEMP_DIR);
  foreach ($dir as $imports) {
    if (is_dir(CommerceSmartImporterConstants::TEMP_DIR . '/' . $imports)) {
      if ($imports == $import_name) {
        return CommerceSmartImporterConstants::TEMP_DIR . '/' . $imports;
      }
    }
  }
  return FALSE;
}