Dashboard.
@return string
505410
public function actionIndex()
    {
        return $this->render('index', [
            'members' => User::find()->orderBy(['id' => SORT_DESC])->limit(10)->all(),
            'posts' => Post::find()->orderBy(['id' => SORT_DESC])->limit(10)->all()
        ]);
    }
1182877
public function dashboardAction()
    {
        /* @var $request \Zend\Http\Request */
        $request     = $this->getRequest();
        $params      = $request->getQuery();
        $isRecruiter = $this->Acl()->isRole(User::ROLE_RECRUITER);

        if ($isRecruiter) {
            $params->set('by', 'me');
        }

        $paginator = $this->paginator('Jobs/Job');

        return [
            'script' => 'jobs/index/dashboard',
            'type'   => $this->params('type'),
            'myJobs' => $this->jobRepository,
            'jobs'   => $paginator
        ];
    }
351503
public function headerMenu()
    {
        if ($this->headerMenu === null) {
            $dashboardConfig = $this->dashboardConfig();

            if (isset($dashboardConfig['secondary_menu'])) {
                $this->headerMenu = $this->createHeaderMenu($dashboardConfig['secondary_menu']);
            } else {
                $this->headerMenu = $this->createHeaderMenu();
            }
        }

        return $this->headerMenu;
    }
1038340
public function getDashboard()
    {
        $view = 'admin.dashboard';

        if (!view()->exists($view)) {
            $view = 'flare::'.$view;
        }

        return view($view, ['widgets' => (new WidgetAdminManager())]);
    }
313425
protected function prepareDashboard(array $dashboard)
    {
        foreach ($dashboard['data'] as &$item) {
            $this->setItemRendered($item, array('content' => $item), array('template_item' => $item['template']));
        }

        return $dashboard;
    }
816544
public function getDecorator()
    {
        $request  = $this->getRequest();
        $response = $this->getResponse();

        if($request->getQuery()->tmpl === 'koowa' || $request->getHeaders()->has('X-Flush-Response') || $response->isError()) {
            $result = 'koowa';
        } else {
            $result = $this->getController()->getView()->getDecorator();
        }

        return $result;
    }
685812
private function getUrlPlugin()
    {
        if(null === $this->url) {
            $this->url = $this->serviceLocator->get('ControllerPluginManager')->get('url');
        }
    
        return $this->url;
    }
641833
public function build()
	{
		$menu = $this->items;

		$html = '';

		if (isset($menu['right'])) {
			$html.= '<ul class="nav navbar-nav navbar-right">';
			$html.= $this->buildMenu($menu['right']);
			$html.= '</ul>';
		}

		$html.= '<ul class="nav navbar-nav">';
		$html.= sprintf('<li><a href="%s">Dashboard</a></li>', route('admin.dashboard'));
		$html.= $this->buildMenu($menu['left']);
		$html.= '</ul>';

		return $html;
	}
1178359
public function showComponentGroups()
    {
        $this->subMenu['groups']['active'] = true;

        return View::make('dashboard.components.groups.index')
            ->withPageTitle(trans_choice('dashboard.components.groups.groups', 2).' - '.trans('dashboard.dashboard'))
            ->withGroups(ComponentGroup::orderBy('order')->get())
            ->withSubMenu($this->subMenu);
    }
1026471
public function dashboard() {
    $build = [];
    $build['content'] = [
      '#type' => 'container',
      '#attributes' => ['class' => ['dashboard-wrapper']],
    ];

    $entity_storage = $this->entityTypeManager()
      ->getStorage('openy_upgrade_log');
    $resolved_count = $entity_storage->getQuery()
      ->condition('status', TRUE)
      ->count()
      ->execute();
    $conflicts_count = $entity_storage->getQuery()
      ->condition('status', TRUE, '!=')
      ->count()
      ->execute();

    $total = $resolved_count + $conflicts_count;
    if ($total === 0) {
      $build['content']['message']['#markup'] = $this->t('Congratulation! You have no conflicts detected.');
    }

    $build['content']['conflict_wrapper'] = [
      '#type' => 'details',
      '#title' => $this->t('Conflicts (@count)', [
        '@count' => $conflicts_count,
      ]),
      '#description' => $this->t('Here you can see list of configs that were changed manually and differ from Open Y. In DIFF modal you can approve this changes or restore Open Y version. <br> Also you can resolve conflict and apply both changes(manual and Open Y).'),
      '#open' => TRUE,
      '#attributes' => ['class' => ['conflicts-wrapper']],
    ];
    $build['content']['conflict_wrapper']['view'] = [
      '#type' => 'view',
      '#name' => 'openy_upgrade_dashboard',
      '#display_id' => 'conflicts',
    ];

    if ($resolved_count >= 1) {
      // Show resolved section only if items exist.
      $build['content']['resolved_wrapper'] = [
        '#type' => 'details',
        '#title' => $this->t('Resolved conflicts (@count)', [
          '@count' => $resolved_count,
        ]),
        '#description' => $this->t('Here you can see list of configs that differ from Open Y, but was approved as resolved.'),
        '#attributes' => ['class' => ['resolved-wrapper']],
      ];
      $build['content']['resolved_wrapper']['view'] = [
        '#type' => 'view',
        '#name' => 'openy_upgrade_dashboard',
        '#display_id' => 'resolved',
      ];
    }

    $build['#attached']['library'][] = 'openy_upgrade_tool/dashboard';

    return $build;
  }
1110968
public function mainMenu()
    {
        if ($this->mainMenu === null) {
            $options = null;

            if ($this instanceof DashboardContainerInterface) {
                $dashboardConfig = $this->dashboardConfig();

                if (isset($dashboardConfig['secondary_menu'])) {
                    $options = $dashboardConfig['secondary_menu'];
                }
            }

            $this->mainMenu = $this->createMainMenu($options);
        }

        return $this->mainMenu;
    }
1157236
private function getExport(): bool
    {
        if (false === $this->export) {
            $this->export = (bool)Configure::read('Search.dashboardExport');
        }

        return $this->export;
    }
884675
protected function getPanelsReport()
    {
        $settings = $this->module->getSettings('ga_report');
        $store_id = $this->getQuery('ga.update.store_id');

        if (!empty($store_id)) {
            $settings['store_id'] = $store_id;
        }

        $panels = array();

        foreach ($this->report_model->getHandlers() as $handler) {

            $report = $this->report_model->get($handler, $settings);

            $data = array(
                'content' => array(
                    'data' => array( // We need so deep nesting for compatibility with dashboard panel templates
                        'report' => $report,
                        'handler' => $handler,
                        'settings' => $settings
                    )
                )
            );

            $panels[$handler['id']] = array('rendered' => $this->render($handler['template'], $data));
        }

        return gplcart_array_split($panels, 3); // Split by columns
    }
1089884
def dashboard(self, request):
        ""
        # TODO: these should be ajax
        module_set = []
        for namespace, module in self.get_modules():
            home_url = module.get_home_url(request)

            if hasattr(module, 'render_on_dashboard'):
                # Show by default, unless a permission is required
                if not module.permission or request.user.has_perm(module.permission):
                    module_set.append((module.get_dashboard_title(), module.render_on_dashboard(request), home_url))

        return self.render_to_response('nexus/dashboard.html', {
            'module_set': module_set,
        }, request)
37727
public function index()
    {
        if ( Shinobi::can( config('watchtower.acl.watchtower.index', false) ) ) {
            $links = config('watchtower.dashboard');
            return view( config('watchtower.views.layouts.dashboard') )
                    ->with('dashboard', $links)
                    ->with('title', config('watchtower.site_title') );
        }

        return view( config('watchtower.views.layouts.unauthorized'), [ 'message' => 'view the dashboard' ]);
    }
963048
public function createAdminSideMenu()
    {
        $groups = $this->adminPool->getDashboardGroups();
        $adminMenu = $this->factory->createItem('admin_side_menu');

        if (!$this->authorizationChecker->isGranted('ROLE_SONATA_ADMIN')) {
            return $adminMenu;
        }

        $iconSize = 'large';
        $firstLevelClass = 'first-level';

        $largeMenu = $adminMenu->addChild(
            'large',
            [
                'attributes' => ['class' => 'nav-custom'], ]
        );
        $smallMenu = $adminMenu->addChild(
            'small',
            [
                'attributes' => ['class' => 'nav-custom nav-custom-small', 'style' => 'margin-top: 50px;'], ]
        );

        $largeMenu->addChild(
            $this->translator->trans('admin.menu.dashboard', [], 'PageAdmin'),
            [
                'uri' => $this->router->generate('sonata_admin_dashboard'),
                'current' => $this->request->get('_sonata_admin') ? false : true,
                'attributes' => ['class' => $firstLevelClass, 'icon' => 'glyphicon glyphicon-dashboard', 'icon_size' => 'glyphicon-'.$iconSize],
                'linkAttributes' => ['class' => 'pull-left first-level-text'],
            ]
        );

        $menu = $largeMenu;
        foreach ($this->menuGroups as $key => $item) {
            foreach ($item['items'] as $mainMenu) {
                if (array_key_exists($mainMenu, $groups)) {
                    $group = $groups[$mainMenu];
                    if (count($group['items']) > 0) {
                        $first = reset($group['items']);
                        if ($first instanceof AdminInterface && $first->hasRoute('list')) {
                            $current = false;
                            $icon = 'glyphicon-unchecked';
                            $iconType = 'glyphicon';

                            if ($this->request->get('_sonata_admin') == $first->getCode()) {
                                $current = true;
                            }

                            if (method_exists($first, 'getIcon')) {
                                $icon = $first->getIcon();
                            }

                            if ($first->getExtensions()) {
                                foreach ($first->getExtensions() as $extension) {
                                    if (method_exists($extension, 'getIcon')) {
                                        $icon = $extension->getIcon();
                                        break;
                                    }
                                }
                            }

                            if (substr($icon, 0, '2') == 'fa') {
                                $iconType = 'fa';
                            }

                            $mainItem = $menu->addChild(
                                $this->translator->trans($group['label'], [], $group['label_catalogue'] != 'SonataAdminBundle' ? $group['label_catalogue'] : $first->getTranslationDomain()),
                                [
                                    'uri' => $first->generateUrl('list'),
                                    'current' => $current,
                                    'attributes' => ['class' => $firstLevelClass, 'icon' => sprintf('%s %s', $iconType, $icon), 'icon_size' => sprintf('%s-%s', $iconType, $iconSize)],
                                    'linkAttributes' => ['class' => 'pull-left first-level-text'],
                                ]
                            );

                            if (count($group['items']) > 1) {
                                foreach ($group['items'] as $subItem) {
                                    $current = false;
                                    if ($this->request->get('_sonata_admin') == $subItem->getCode()) {
                                        $current = true;
                                    }
                                    if ($subItem instanceof AdminInterface && $subItem->hasRoute('list')) {
                                        $mainItem->addChild(
                                            $this->translator->trans($subItem->getLabel(), [], $subItem->getTranslationDomain()),
                                            [
                                                'uri' => $subItem->generateUrl('list'),
                                                'current' => $current,
                                                'attributes' => ['class' => 'second-level', 'icon' => $icon, 'icon_size' => $iconSize],
                                            ]
                                        );
                                    }
                                }
                            }
                        }
                    }
                }
            }

            $iconSize = 'small';
            $firstLevelClass = 'first-level-small';
            $this->showOnlyCurrentChildren($menu);
            $menu = $smallMenu;
        }

        return $adminMenu;
    }
342374
public function index()
    {
        $query = $this->Dashboards->getUserDashboards($this->Auth->user());
        $entity = $query->first();

        if (null !== $entity) {
            return $this->redirect(['action' => 'view', $entity->get('id')]);
        }
    }