Re-add deprecated Pico::getBaseThemeUrl() and AbstractPicoPlugin::__call()
This reverts commitsefc4fb5288
andbc816febfc
This commit is contained in:
parent
41fc15a7e8
commit
fe6c8f805a
2 changed files with 38 additions and 0 deletions
|
@ -193,6 +193,30 @@ abstract class AbstractPicoPlugin implements PicoPluginInterface
|
|||
return isset($pluginConfig[$configName]) ? $pluginConfig[$configName] : $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passes all not satisfiable method calls to Pico
|
||||
*
|
||||
* @see PicoPluginInterface::getPico()
|
||||
*
|
||||
* @deprecated 2.1.0
|
||||
*
|
||||
* @param string $methodName name of the method to call
|
||||
* @param array $params parameters to pass
|
||||
*
|
||||
* @return mixed return value of the called method
|
||||
*/
|
||||
public function __call($methodName, array $params)
|
||||
{
|
||||
if (method_exists($this->getPico(), $methodName)) {
|
||||
return call_user_func_array(array($this->getPico(), $methodName), $params);
|
||||
}
|
||||
|
||||
throw new BadMethodCallException(
|
||||
'Call to undefined method ' . get_class($this->getPico()) . '::' . $methodName . '() '
|
||||
. 'through ' . get_called_class() . '::__call()'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables all plugins which this plugin depends on
|
||||
*
|
||||
|
|
14
lib/Pico.php
14
lib/Pico.php
|
@ -2373,6 +2373,20 @@ class Pico
|
|||
return substr($path, $contentDirLength, -$contentExtLength) ?: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the URL of the themes folder of this Pico instance
|
||||
*
|
||||
* @see Pico::getUrlFromPath()
|
||||
*
|
||||
* @deprecated 2.1.0
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBaseThemeUrl()
|
||||
{
|
||||
return $this->getConfig('themes_url');
|
||||
}
|
||||
|
||||
/**
|
||||
* Substitutes URL placeholders (e.g. %base_url%)
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue