Skip to content

Commit

Permalink
setting multiple plugins per vocabulary now works correctly, related to
Browse files Browse the repository at this point in the history
  • Loading branch information
henriyli committed Mar 9, 2016
1 parent bdce503 commit 814230f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions model/VocabularyConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ class VocabularyConfig extends DataObject

public function __construct($resource, $globalPlugins=array())
{
$this->resource = $resource;
$plugins = $this->resource->getLiteral('skosmos:usePlugin');
$pluginArray = $plugins ? array($plugins->getValue()) : array();
$this->plugins = new Plugins(array_merge($globalPlugins, $pluginArray));
$this->resource = $resource;
$plugins = $this->resource->allLiterals('skosmos:usePlugin');
$pluginArray = array();
foreach ($plugins as $pluginlit) {
$pluginArray[] = $pluginlit->getValue();
}
$this->plugins = new Plugins(array_merge($globalPlugins, $pluginArray));
}

/**
Expand Down

0 comments on commit 814230f

Please sign in to comment.