Skip to content

Commit

Permalink
refs matomo-org#4241 we no longer use templates
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Nov 11, 2013
1 parent b8fa99e commit 085c55f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions plugins/CoreConsole/Commands/GeneratePluginBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,14 @@ protected function createFileWithinPluginIfNotExists($pluginName, $fileName, $co
}

/**
* @param string $templateNameOrPath eg. 'controller' or 'api' or a full path like /home/...
* @param string $templateFolder full path like /home/...
* @param string $pluginName
* @param array $replace array(key => value) $key will be replaced by $value in all templates
* @param array $whitelistFiles If not empty, only given files/directories will be copied.
* For instance array('/Controller.php', '/templates', '/templates/index.twig')
*/
protected function copyTemplateToPlugin($templateNameOrPath, $pluginName, array $replace = array(), $whitelistFiles = array())
protected function copyTemplateToPlugin($templateFolder, $pluginName, array $replace = array(), $whitelistFiles = array())
{
if (0 === strpos($templateNameOrPath, '/')) {
$templateFolder = $templateNameOrPath;
} else {
$templateFolder = __DIR__ . '/templates/' . $templateNameOrPath;
}

$replace['PLUGINNAME'] = $pluginName;

$files = Filesystem::globr($templateFolder, '*');
Expand Down

0 comments on commit 085c55f

Please sign in to comment.