mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merged revisions 50812 via svnmerge from
http://svn.silverstripe.com/open/modules/sapphire/branches/2.2.2 ........ r50812 | sminnee | 2008-03-11 10:34:32 +1300 (Tue, 11 Mar 2008) | 1 line #2285 - Fixed widget editor ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@50884 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b8262b6d48
commit
bfc51aa63f
@ -104,4 +104,17 @@ class Widget extends DataObject {
|
||||
}
|
||||
}
|
||||
|
||||
class Widget_Controller extends Controller {
|
||||
function editablesegment() {
|
||||
$className = $this->urlParams['ID'];
|
||||
if(class_exists($className) && is_subclass_of($className, 'Widget')) {
|
||||
$obj = new $className();
|
||||
return $obj->EditableSegment();
|
||||
} else {
|
||||
user_error("Bad widget class: $className", E_USER_WARNING);
|
||||
return "Bad widget class name given";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user