Skip to content

Commit

Permalink
Allow singles as a source
Browse files Browse the repository at this point in the history
  • Loading branch information
bvangennep committed Jun 3, 2016
1 parent 66d4022 commit 314343a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,11 @@ This project has been licensed under the MIT License (MIT). Please see [License

## Changelog

###3.3.2###
- Allow 'singles' as a source

###3.3.1###
- Return empty string when field source not found at import
- Return empty string when field source not found at import

###3.3.0###
- Schematic now also exports and imports category groups (thanks to @smcyr, closes #31)
Expand Down
4 changes: 4 additions & 0 deletions src/Models/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ private function getMappedSources($fieldType, $sources, $indexFrom, $indexTo)
*/
private function getSource($fieldType, $source, $indexFrom, $indexTo)
{
if ($source == 'singles') {
return $source;
}

/** @var BaseElementModel $sourceObject */
$sourceObject = null;

Expand Down

0 comments on commit 314343a

Please sign in to comment.