Skip to content

Commit

Permalink
dev: add getTemplateList to LimeSurveyApi to enable getting template …
Browse files Browse the repository at this point in the history
…list to plugins via API
  • Loading branch information
TonisOrmisson committed Feb 7, 2017
1 parent 33fd64e commit e7be7ba
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion application/libraries/PluginManager/LimesurveyApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
use User;
use PluginDynamic;
use SurveyDynamic;
use Template;

/**
* Class exposing a Limesurvey API to plugins.
* This class is instantiated by the plugin manager,
Expand Down Expand Up @@ -168,13 +170,21 @@ public function EMevaluateExpression($expression)
/**
* Get the current request object
*
* @return LSHttpRequest
* @return \LSHttpRequest
*/
public function getRequest()
{
return App()->getRequest();
}

/**
* Returns an array of all available template names - does a basic check if the template might be valid
* @return array
*/
public function getTemplateList(){
return Template::getTemplateList();
}

/**
* Gets a survey response from the database.
*
Expand Down

0 comments on commit e7be7ba

Please sign in to comment.