Piwik\Plugins\Dashboard\Controller::getLayout PHP Метод

getLayout() защищенный Метод

Get the dashboard layout for the current user (anonymous or logged user)
protected getLayout ( integer $idDashboard ) : string
$idDashboard integer
Результат string $layout
    protected function getLayout($idDashboard)
    {
        if (Piwik::isUserIsAnonymous()) {
            $session = new SessionNamespace("Dashboard");
            if (!isset($session->dashboardLayout)) {
                return $this->dashboard->getDefaultLayout();
            }
            $layout = $session->dashboardLayout;
        } else {
            $layout = $this->dashboard->getLayoutForUser(Piwik::getCurrentUserLogin(), $idDashboard);
        }
        if (!empty($layout)) {
            $layout = $this->dashboard->removeDisabledPluginFromLayout($layout);
        }
        if (empty($layout)) {
            $layout = $this->dashboard->getDefaultLayout();
        }
        return $layout;
    }