Skip to content

Commit

Permalink
renaming the plugin template property and its getters, related to #476
Browse files Browse the repository at this point in the history
  • Loading branch information
henriyli committed Mar 4, 2016
1 parent aab25b2 commit d9cf8b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions model/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public function getPluginsCSS($names=null) {
return $this->filterPlugins('css');
}

public function getPluginsHTML($names=null) {
public function getPluginsTemplates($names=null) {
if ($names) {
return $this->filterPluginsByName('html', $names);
return $this->filterPluginsByName('templates', $names);
}
return $this->filterPlugins('html');
return $this->filterPlugins('templates');
}
}
4 changes: 2 additions & 2 deletions model/VocabularyConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,11 +378,11 @@ public function getPluginsJS()
*
* @return array
*/
public function getPluginsHTML()
public function getPluginsTemplates()
{
$plugins = $this->resource->getLiteral('skosmos:usePlugin');
if ($plugins) {
return $this->plugins->getPluginsHTML(array($plugins->getValue()));
return $this->plugins->getPluginsTemplates(array($plugins->getValue()));
}
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion view/light.twig
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,6 @@
</section>
{% include 'scripts.twig' %}
{% include 'footer.inc' ignore missing %}
{% for name, plugin in request.vocab.config.pluginsHTML %}<script id="{{ name }}-template" type="text/x-handlebars-template">{% include plugin %}</script>{% endfor %}
{% for name, plugin in request.vocab.config.pluginsTemplates %}<script id="{{ name }}-template" type="text/x-handlebars-template">{% for file in plugin %}{{ source(file) }}{% endfor %}</script>{% endfor %}
</body>
</html>

0 comments on commit d9cf8b9

Please sign in to comment.