This repository has been archived by the owner on May 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Modesto Caballero
committed
Jul 16, 2014
1 parent
5562d37
commit 612a14f
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* @file | ||
* Populate content for field collections. | ||
*/ | ||
|
||
class defaultFile extends defaultBaseMigration { | ||
|
||
public function __construct(array $arguments) { | ||
$this->arguments = $arguments; | ||
parent::__construct($arguments); | ||
|
||
$this->addDefaultMappings(); | ||
|
||
$this->map = new MigrateSQLMap($this->machineName, | ||
array( | ||
'id' => array( | ||
'type' => 'varchar', | ||
'length' => 255, | ||
'not null' => TRUE, | ||
), | ||
), | ||
MigrateDestinationFile::getKeySchema() | ||
); | ||
// Create a MigrateSource object. | ||
$this->source = $this->getMigrationSource(); | ||
$this->destination = new MigrateDestinationFile($this->migrationData['bundle']); | ||
|
||
} | ||
|
||
protected function preprocessMapping($key, $value) { | ||
if ($key == 'source_dir') { | ||
$value['default_value'] = $this->arguments['source_path'] . '/' . $value['default_value']; | ||
} | ||
parent::preprocessMapping($key, $value); | ||
} | ||
|
||
|
||
} |
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