You are here

protected function GatherContentMigrateSource::getFiles in GatherContent 8.5

Returns the correct files for the gathecontent content.

Parameters

array $gcFiles: Gathercontent file array.

\Cheppers\GatherContent\DataTypes\Element $field: Gathercontent field.

Return value

array File list.

File

src/Plugin/migrate/source/GatherContentMigrateSource.php, line 235

Class

GatherContentMigrateSource
A source class for Gathercontent API.

Namespace

Drupal\gathercontent\Plugin\migrate\source

Code

protected function getFiles(array $gcFiles, Element $field) {
  $value = [];
  foreach ($gcFiles as $file) {
    if ($file->field == $field->id) {
      $value[] = $file;
    }
  }
  return $value;
}