public function getAreas() { $areas = array(); ob_start(); fx::listen('render_area.get_areas', function ($e) use(&$areas) { $areas[$e['area']['id']] = $e['area']; }); $this->render(array('_idle' => true)); fx::unlisten('render_area.get_areas'); // hm, since IB render res is cached, we can not just remove added files // because they won't be added again // may be we should switch off caching for idle mode //fx::page()->clear_files(); ob_get_clean(); return $areas; }