function File::initializeIterator

Same name in this branch
  1. 11.x core/modules/file/src/Plugin/migrate/source/d7/File.php \Drupal\file\Plugin\migrate\source\d7\File::initializeIterator()
Same name in other branches
  1. 9 core/modules/file/src/Plugin/migrate/source/d6/File.php \Drupal\file\Plugin\migrate\source\d6\File::initializeIterator()
  2. 9 core/modules/file/src/Plugin/migrate/source/d7/File.php \Drupal\file\Plugin\migrate\source\d7\File::initializeIterator()
  3. 8.9.x core/modules/file/src/Plugin/migrate/source/d6/File.php \Drupal\file\Plugin\migrate\source\d6\File::initializeIterator()
  4. 8.9.x core/modules/file/src/Plugin/migrate/source/d7/File.php \Drupal\file\Plugin\migrate\source\d7\File::initializeIterator()
  5. 10 core/modules/file/src/Plugin/migrate/source/d6/File.php \Drupal\file\Plugin\migrate\source\d6\File::initializeIterator()
  6. 10 core/modules/file/src/Plugin/migrate/source/d7/File.php \Drupal\file\Plugin\migrate\source\d7\File::initializeIterator()

Overrides SqlBase::initializeIterator

File

core/modules/file/src/Plugin/migrate/source/d6/File.php, line 82

Class

File
Drupal 6 file source from database.

Namespace

Drupal\file\Plugin\migrate\source\d6

Code

protected function initializeIterator() {
    $site_path = $this->configuration['site_path'] ?? 'sites/default';
    $this->filePath = $this->variableGet('file_directory_path', $site_path . '/files') . '/';
    $this->tempFilePath = $this->variableGet('file_directory_temp', '/tmp') . '/';
    // FILE_DOWNLOADS_PUBLIC == 1 and FILE_DOWNLOADS_PRIVATE == 2.
    $this->isPublic = $this->variableGet('file_downloads', 1) == 1;
    return parent::initializeIterator();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.