Show all items.

@return void
2450
public function getTaggedQuestions($tag)
    {
        $question = new Question($this->di->get("db"));

        $questions = $question->getQuestions();



        $filteredQuestions = array_filter($questions, function ($value) use ($tag) {
            return in_array($tag, $value->tags);
        });

        $views = [
            ["comment/question/view-all", ["questions" => $filteredQuestions,
             "headerTitle" => "Frågor med taggen $tag"], "main"]
        ];

        $this->di->get("pageRenderComment")->renderPage([
            "views" => $views,
            "title" => "Questions | $tag"
        ]);
    }
470047
public function ListingItems()
    {
        // need to get the items being listed
        $source = $this->getListingSource();

        $listType = $this->ListType ? $this->ListType : 'Page';

        $filter = array();

        $objFields = $this->getSelectableFields($listType);

        if ($source) {
            $ids = $this->getIdsFrom($source, 1);
            $ids[] = $source->ID;

            if (isset($objFields['ParentID']) && count($ids)) {
                $filter['ParentID'] = $ids;
            }
        }

        if ($this->StrictType) {
            $filter['ClassName'] = $listType;
        }

        $sortDir = $this->SortDir == 'Ascending' ? 'ASC' : 'DESC';
        $sort = $this->SortBy && isset($objFields[$this->SortBy]) ? $this->SortBy : 'Title';
        $req = Controller::has_curr() ? Controller::curr()->getRequest() : null;

        if (strlen($this->CustomSort) && $req) {
            $sortField = $req->getVar($this->CustomSort);
            if ($sortField) {
                $sort = isset($objFields[$sortField]) ? $sortField : $sort;
                $sortDir = $req->getVar($this->CustomSort . '_dir');
                $sortDir = $sortDir === 'asc' ? 'ASC' : 'DESC';
            }
        }

        // Bind these variables into the current page object because the
        // template may want to read them out after.
        //
        // - nyeholt 2017-12-19
        $this->CurrentSort = $sort;
        $this->CurrentDir = $sortDir;
        $this->CurrentSource = $source;
        $this->CurrentLink = $req ? $req->getURL() : $this->Link();

        // $sort = $this->CustomSort ? $this->CustomSort : $sort;
        $sort .= ' ' . $sortDir;

        $limit = '';

        $pageUrlVar = 'page' . $this->ID;

        $items = DataList::create($listType)->filter($filter)->sort($sort);

        if ($this->PerPage) {
            $page = isset($_REQUEST[$pageUrlVar]) ? (int) $_REQUEST[$pageUrlVar] : 0;
            $items  = $items->limit($this->PerPage, $page);
        }
        if ($this->ComponentFilterName) {
            $controller = (Controller::has_curr()) ? Controller::curr() : null;
            $tags = array();
            if ($controller && $controller instanceof ListingPageController) {
                $tagName = $controller->getRequest()->latestParam('Action');
                if ($tagName) {
                    $tags = $this->ComponentListingItems();
                    $tags = $tags->filter(array($this->ComponentFilterColumn => $tagName));
                    $tags = $tags->toArray();
                    if (!$tags) {
                        // Workaround cms/#1045
                        // - Stop infinite redirect
                        // @see: https://github.com/silverstripe/silverstripe-cms/issues/1045
                        unset($controller->extension_instances['OldPageRedirector']);

                        return $controller->httpError(404);
                    }
                }
            }

            if ($tags) {
                if (count($tags) > 1) {
                    return $controller->httpError(500, 'ComponentFilterColumn provided is not unique. ' . count($tags) . ' matches found in query.');
                }
                $tag = reset($tags);
                $tagComponent = DataObject::getSchema()->manyManyComponent($this->ListType, $this->ComponentFilterName);
                $parentClass = ClassInfo::shortName($tagComponent['parentClass']);
                $items = $items->innerJoin(
                    $tagComponent['join'],
                    "\"{$tagComponent['parentField']}\" = \"$parentClass\".\"ID\" AND \"{$tagComponent['childField']}\" = " . (int)$tag->ID
                );
            } else {
                $tags = new ArrayList();
            }
        }

        $this->extend('updateListingItems', $items);

        $newList = ArrayList::create();
        if ($items) {
            $newList = PaginatedList::create($items);
            // ensure the 0 limit is applied if configured as such
            $newList->setPageLength($this->PerPage);
            $newList->setPaginationGetVar($pageUrlVar);
            if ($items instanceof DataList) {
                $newList->setPaginationFromQuery($items->dataQuery()->query());
            }
        }

        return $newList;
    }
488408
protected function displayChildren()
    {
        foreach ($this->children as &$child) {
            ob_start();
            $child->display();
            $content = ob_get_clean();
            if ($content != '') {
                echo '<li>', $content, '</li>';
            }
        }
    }
1332592
public function index() {        
        $action = Filter::post('action');        
        if($action == 'update' && Filter::checkCsrf()) $this->update();
        
        Theme::theme(new AdministrationTheme)->init(Globals::getTree());        
        $ctrl = new PageController();
        $ctrl
            ->restrictAccess(Auth::isAdmin())
            ->setPageTitle($this->module->getTitle());

        $view_bag = new ViewBag();
        $view_bag->set('title', $ctrl->getPageTitle());
        $view_bag->set('module', $this->module);
        
        ViewFactory::make('AdminConfig', $this, $ctrl, $view_bag)->render();
    }
763872
public function all()
    {
        $blogs = $this->repository->published();
        $tags = $this->repository->allTags();

        if (empty($blogs)) {
            abort(404);
        }

        return view('cms-frontend::blog.all')
            ->with('tags', $tags)
            ->with('blogs', $blogs);
    }
355950
public function all()
    {
        $this->out('<info>Compiling all templates</info>');

        foreach (Scanner::all() as $section => $templates) {
            $this->out('<info>Compiling ' . $section . '\'s templates</info>');
            $this->walkIterator($templates);
        }
    }
206759
public function listAction()
    {
        $this->checkFolders();
        $this->view->assign('missingFolders', $this->missingFolders);
        $this->view->assign('storages', $this->storageRepository->load());
    }
1101486
public function index()
    {
        $this->Search->addFilter('email');

        $this->Search->addFilter('role_id', [
            'options' => $this->Users->Roles->find('list')->toArray(),
        ]);

        $search = $this->Search->search($this->Users->find('all', ['contain' => ['Roles']]));

        $this->set('users', $this->paginate($search));

        $this->render(Configure::read('CM.AdminUserViews.index'));
    }
507639
public function allTrue()
    {
        if (is_array($this->result)) {
            foreach ($this->result as $item) {
                if ($item === false) {
                    return false;
                }
            }
            return true;
        }

        return $this->result === true;
    }
838590
public function index()
    {
        $languages = $this->Languages->find('all');
        $this->set(compact('languages'));
        $this->set('_serialize', ['languages']);
    }
1040730
public function render()
    {
        $items = [
            'header'      => $this->header,
            'description' => $this->description,
            'breadcrumb'  => $this->breadcrumb,
            'content'     => $this->build(),
        ];

        return view('merchant::content', $items)->render();
    }
393251
public function setAllLoaded()
	{
		$this->_allChildrenloaded = true;

		foreach ($this->_children as $child)
		{
			$child->setAllLoaded();
		}
	}
714269
public function display()
    {
        $bc = $this->get();
        $cnt = count($bc);
        if ($cnt > 0) {
            foreach ($bc as $item) {
                echo --$cnt ? "<a href=\"{$item['uri']}\" title=\"{$item['descr']}\">" : '';
                echo $item['title'];
                echo $cnt ? '</a>&nbsp;&raquo;&nbsp;' : '';
            }
            echo "\n";
        }
    }
783972
public function All() {
      // Setup head.
      $this->Menu->HighlightRoute('/discussions');
      if (!$this->Title()) {
         $Title = C('Garden.HomepageTitle');
         if ($Title)
            $this->Title($Title, '');
         else
            $this->Title(T('All Categories'));
      }
      Gdn_Theme::Section('CategoryList');
            
      $this->Description(C('Garden.Description', NULL));
      
      $this->SetData('Breadcrumbs', CategoryModel::GetAncestors(GetValue('CategoryID', $this->Data('Category'))));
     
      // Set the category follow toggle before we load category data so that it affects the category query appropriately.
      $CategoryFollowToggleModule = new CategoryFollowToggleModule($this);
      $CategoryFollowToggleModule->SetToggle();
      
      // Get category data
      $this->CategoryModel->Watching = !Gdn::Session()->GetPreference('ShowAllCategories');
      
      $Categories = $this->CategoryModel->GetFull()->ResultArray();
      $this->SetData('Categories', $Categories);
      
      // Add modules
      $this->AddModule('NewDiscussionModule');
      $this->AddModule('DiscussionFilterModule');
      $this->AddModule('BookmarkedModule');
      $this->AddModule($CategoryFollowToggleModule);

      $this->CanonicalUrl(Url('/categories', TRUE));
      
      $Location = $this->FetchViewLocation('helper_functions', 'categories', FALSE, FALSE);
      if ($Location)
         include_once $Location;
      $this->Render();
   }
724471
public static function show()
	{
		$this->config = Config::get();

		if ($this->config->ShowErrors == 1) {
			ini_set('error_reporting', E_ALL);
			ini_set('display_errors', 1);
			ini_set('display_startup_errors', 1);
		}
	}
307662
public function index()
    {
        /** @var \Colibri\Database\ModelCollection $items */
        $items = new $this->listClass();
        $this->applyListFilters($items);
        $items->load();

        $this->template->vars[$this->listTplVar] = $items;
        if ($this->pagedList) {
            $this->template->vars['pagination'] = [
                'page'           => (int)(isset($_GET['page']) ? $_GET['page'] : 0),
                'recordsPerPage' => $items->recordsPerPage,
                'recordsCount'   => $items->recordsCount,
                'pagesCount'     => $items->pagesCount,
                'base_url'       => '/' . $this->division . '/' . $this->module,
            ];
        }
    }
968709
public function actionAll() {

		$modelClass	= $this->modelService->getModelClass();

		$dataProvider = $this->modelService->getPageByType( $this->type );

		return $this->render( 'all', [
			'dataProvider' => $dataProvider,
			'submits' => $this->submits,
			'visibilityMap' => $modelClass::$visibilityMap,
			'statusMap' => $modelClass::$statusMap
		]);
	}