Moved callPageMethod to leftandmain, so that I can use it in other CMS controllers

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@40907 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2007-08-27 05:06:57 +00:00
parent 628105c410
commit b747f9c42e
2 changed files with 9 additions and 9 deletions

View File

@ -1110,15 +1110,6 @@ HTML;
$page = DataObject::get_by_id("SiteTree", $_REQUEST['ID']);
return $page->testInvitation($data,$form);
}
/**
* Use this as an action handler for custom CMS buttons.
*/
function callPageMethod($data, $form) {
$methodName = $form->buttonClicked()->extraData();
$record = $this->CurrentPage();
return $record->$methodName($data, $form);
}
/**
* Provide the permission codes used by LeftAndMain.

View File

@ -765,6 +765,15 @@ JS;
function MceRoot() {
return MCE_ROOT;
}
/**
* Use this as an action handler for custom CMS buttons.
*/
function callPageMethod($data, $form) {
$methodName = $form->buttonClicked()->extraData();
$record = $this->CurrentPage();
return $record->$methodName($data, $form);
}
}
?>