Back to Sidebar class

Method render

public static string
render
()
Render the sidebar.
Returns
  • string The necessary HTML to display the sidebar
Since
  • 3.0
Class: Sidebar
Project: Joomla

Method render - Source code

/**
 * Render the sidebar.
 *
 * @return  string  The necessary HTML to display the sidebar
 *
 * @since   3.0
 */
public static function render()
{
    // Collect display data
    $data = new \stdClass();
    $data->list = static::getEntries();
    $data->filters = static::getFilters();
    $data->action = static::getAction();
    $data->displayMenu = count($data->list);
    $data->displayFilters = count($data->filters);
    $data->hide = Factory::getApplication()->input->getBool('hidemainmenu');
    // Create a layout object and ask it to render the sidebar
    $layout = new FileLayout('joomla.sidebars.submenu');
    return $layout->render($data);
}