Skip to content

Commit

Permalink
Fixed registerSchematicSources hook
Browse files Browse the repository at this point in the history
  • Loading branch information
bvangennep committed Dec 14, 2018
1 parent 2d832c3 commit 0860ddb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 3.8.11 ###
- Fixed registerSchematicSources hook

### 3.8.10 ###
- Added dummy getTheme method to schematic application

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public function registerMigrationService()
Gives plugins a chance to register their own Migration Services to Schematic in order to import or exports their own data.

```php
public function registerSchematicSource($indexFrom)
public function registerSchematicSources($indexFrom)
{
$mapping = [
'createSomething:handle1' => 'createSomething:1'
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Sources.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private function getHookedSource($source, $indexFrom)
private function loadHookedSources($indexFrom)
{
if (!isset($this->hookedSources[$indexFrom])) {
$this->hookedSources[$indexFrom] = Craft::app()->plugins->call('registerSchematicSources');
$this->hookedSources[$indexFrom] = Craft::app()->plugins->call('registerSchematicSources', [$indexFrom]);
}
}
}

0 comments on commit 0860ddb

Please sign in to comment.