Created
August 3, 2016 17:40
-
-
Save sgurlt/ccff70f6e02fd936e89978a4bcb714c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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