/* The following gives: Fatal error: Call to a member function setSlot() on a non-object in... on line 25 Why? */ public function setupHtml(AgaviRequestDataHolder $rd, $layoutName = null) { if($layoutName === null && $this->getContainer()->getParameter('is_slot', false)) { $layoutName = 'slot'; } $this->loadLayout($layoutName); // THIS is the line 25. // Set up the admin menu on the top of the page IF the user has authenticated. if($this->context->getUser()->isAuthenticated() && !$this->getContainer()->getParameter('is_slot')) { $menuCon = $this->createSlotContainer('Admin', 'AdminTopMenu'); $this->getLayer('decorator')->setSlot('admin_top_menu', $menuCon); } }