Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save heddn/d1648393c2cc5464a042e086185a1cb5 to your computer and use it in GitHub Desktop.
Save heddn/d1648393c2cc5464a042e086185a1cb5 to your computer and use it in GitHub Desktop.
<?php
/**
* @file
* Contains \Drupal\nv_migrate\Plugin\migrate\source\csv_club.
*/
namespace Drupal\nv_migrate\Plugin\migrate\source;
use Drupal\migrate_source_csv\Plugin\migrate\source\CSV;
/**
* Source for csv_club.
*
* If the CSV file contains non-ASCII characters, make sure it includes a
* UTF BOM (Byte Order Marker) so they are interpreted correctly.
*
* @MigrateSource(
* id = "csv_club"
* )
*/
class csv_club extends CSV {
/**
* {@inheritdoc}
*/
public function getIDs() {
$ids = [];
foreach ($this->configuration['keys'] as $key) {
$ids[$key]['type'] = 'string';
}
$ids['club_saison']['type'] = 'string';
return $ids;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment