I am getting the follwing error in ModelAdmin 2.4:
Fatal error: Call to a member function getModelSidebar() on a non-object in cms/code/ModelAdmin.php on line 251:
'Content' => $this->$class->getModelSidebar()
protected function getModelForms() {
$models = $this->getManagedModels();
$forms = new DataObjectSet();
foreach($models as $class => $options) {
if(is_numeric($class)) $class = $options;
$forms->push(new ArrayData(array (
'Title' => (is_array($options) && isset($options['title'])) ? $options['title'] : singleton($class)->i18n_singular_name(),
'ClassName' => $class,
'Content' => $this->$class->getModelSidebar()
)));
}
return $forms;
}
I do not understand this. Does anybody know, why this happens and what I can do to make it work?