mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
APICHANGE: Rename getExposedVariables to match coding conventions
This commit is contained in:
parent
f8edc4bd13
commit
fb246bdd08
@ -584,7 +584,7 @@ class Controller extends RequestHandler implements TemplateGlobalProvider {
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function getExposedVariables() {
|
||||
public static function get_exposed_variables() {
|
||||
return array(
|
||||
'CurrentPage' => 'curr',
|
||||
);
|
||||
|
@ -870,7 +870,7 @@ class Director implements TemplateGlobalProvider {
|
||||
* @return array Returns an array of strings of the method names of methods on the call that should be exposed
|
||||
* as global variables in the templates.
|
||||
*/
|
||||
public static function getExposedVariables() {
|
||||
public static function get_exposed_variables() {
|
||||
return array(
|
||||
'absoluteBaseURL',
|
||||
'baseURL',
|
||||
|
@ -1957,7 +1957,7 @@ class i18n extends Object implements TemplateGlobalProvider {
|
||||
}
|
||||
}
|
||||
|
||||
public static function getExposedVariables() {
|
||||
public static function get_exposed_variables() {
|
||||
return array(
|
||||
'i18nLocale' => 'get_locale',
|
||||
'get_locale',
|
||||
|
@ -1379,7 +1379,7 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
return $currentName ? $currentName : 'cms';
|
||||
}
|
||||
|
||||
public static function getExposedVariables() {
|
||||
public static function get_exposed_variables() {
|
||||
return array(
|
||||
'CurrentMember' => 'currentUser',
|
||||
'currentUser'
|
||||
|
@ -622,7 +622,7 @@ class Permission extends DataObject implements TemplateGlobalProvider {
|
||||
Permission::flush_permission_cache();
|
||||
}
|
||||
|
||||
public static function getExposedVariables() {
|
||||
public static function get_exposed_variables() {
|
||||
return array(
|
||||
'HasPerm' => 'check'
|
||||
);
|
||||
|
@ -218,7 +218,7 @@ class SecurityToken extends Object implements TemplateGlobalProvider {
|
||||
return $generator->generateHash('sha1');
|
||||
}
|
||||
|
||||
public static function getExposedVariables() {
|
||||
public static function get_exposed_variables() {
|
||||
return array(
|
||||
'getSecurityID',
|
||||
'SecurityID' => 'getSecurityID'
|
||||
|
@ -134,7 +134,7 @@ class SSViewer_BasicIteratorSupport implements TemplateIteratorProvider {
|
||||
protected $iteratorPos;
|
||||
protected $iteratorTotalItems;
|
||||
|
||||
public static function getExposedVariables() {
|
||||
public static function get_exposed_variables() {
|
||||
return array(
|
||||
'First',
|
||||
'Last',
|
||||
@ -325,7 +325,7 @@ class SSViewer_DataPresenter extends SSViewer_Scope {
|
||||
if ($implementers && count($implementers) > 0) {
|
||||
foreach($implementers as $implementer) {
|
||||
if ($createObject) $implementer = new $implementer(); //create a new instance of the object for method calls
|
||||
$exposedVariables = $implementer::getExposedVariables(); //get the exposed variables
|
||||
$exposedVariables = $implementer::get_exposed_variables(); //get the exposed variables
|
||||
|
||||
foreach($exposedVariables as $varName => $methodName) {
|
||||
if (!$varName || is_numeric($varName)) $varName = $methodName; //array has just a single value, use it for both key and value
|
||||
|
@ -15,7 +15,7 @@ interface TemplateGlobalProvider {
|
||||
* correspond to the actual method name in the relevant class.
|
||||
* Note that the template renderer must be able to call these methods statically.
|
||||
*/
|
||||
public static function getExposedVariables();
|
||||
public static function get_exposed_variables();
|
||||
}
|
||||
|
||||
?>
|
@ -15,7 +15,7 @@ interface TemplateIteratorProvider {
|
||||
* correspond to the actual method name in the relevant class.
|
||||
* Note that the template renderer must be able to call these methods statically.
|
||||
*/
|
||||
public static function getExposedVariables();
|
||||
public static function get_exposed_variables();
|
||||
|
||||
/**
|
||||
* Set the current iterator properties - where we are on the iterator.
|
||||
|
Loading…
x
Reference in New Issue
Block a user