Browse blog tags
@return void
773661
public function index()
    {
        //  Page data
        $this->data['page']->title = 'Blog &rsaquo; Tags';

        // --------------------------------------------------------------------------

        $data                  = array();
        $data['include_count'] = true;
        $data['where']         = array();
        $data['where'][]       = array('column' => 'blog_id', 'value' => $this->blog->id);

        $this->data['tags'] = $this->blog_tag_model->getAll(null, null, $data);

        // --------------------------------------------------------------------------

        Helper::loadView('index');
    }
861902
public function taggedWith($tag)
    {
        $results = [];

        if (isset($this->tags[$tag]))
        {
            foreach ($this->tags[$tag] as $view)
            {
                $results[] = $view;
            }

        }

        return $results;
    }
488227
public function taggedAs($tag)
    {
        if (empty($this->current_node)) {
            return;
        }

        $this->current_node->tags = $tag;
        $this->current_node->save();
    }
256247
public function tag()
    {
        $tag = $this->getCurrentTag();

        if ($tag) {
            $this->blogPosts = $tag->BlogPosts();

            if ($this->isRSS()) {
                return $this->rssFeed($this->blogPosts, $tag->getLink());
            } else {
                return $this->render();
            }
        }

        $this->httpError(404, 'Not Found');

        return null;
    }
1303892
protected function setOgTags()
    {
        if ($this->arResult['OG_TAGS']['TITLE'])
        {
            Asset::getInstance()->addString('<meta property="og:title" content="'.$this->arResult['OG_TAGS']['TITLE'].'" />', true);
        }

        if ($this->arResult['OG_TAGS']['DESCRIPTION'])
        {
            Asset::getInstance()->addString('<meta property="og:description" content="'.$this->arResult['OG_TAGS']['DESCRIPTION'].'" />', true);
        }

        if ($this->arResult['OG_TAGS']['URL'])
        {
            Asset::getInstance()->addString('<meta property="og:url" content="'.$this->arResult['OG_TAGS']['URL'].'" />', true);
        }

        if ($this->arResult['OG_TAGS']['IMAGE'])
        {
            Asset::getInstance()->addString('<meta property="og:image" content="'.$this->arResult['OG_TAGS']['IMAGE'].'" />', true);
        }
    }
372187
public function tagged()
    {
        $out = '';

        // call stream filters.
        foreach ($this->streamFilters as $f) {
            $this->tokens = call_user_func($f[1], $this->tokens);
        }
        foreach ($this->tokens as $t) {
            $type = $t[0];

            // speed is roughly 10% faster if we process the filters inside this
            // loop instead of separately.
            if (isset($this->filters[$type])) {
                foreach ($this->filters[$type] as $filter) {
                    $t = call_user_func($filter[1], $t);
                }
            }
            list($type, $string, $esc) = $t;

            if (!$esc) {
                $string = Utils::escapeString($string);
            }
            if ($type !== null) {
                $out .= Utils::tagBlock($type, $string);
            } else {
                $out .= $string;
            }
        }
        return $out;
    }
629730
public function index()
    {
        return collect($this->tags->monitoring())->map(function ($tag) {
            return [
                'tag' => $tag,
                'count' => $this->tags->count($tag) + $this->tags->count('failed:'.$tag),
            ];
        })->sortBy('tag')->values();
    }
1274185
public function index()
    {
        if (!userHasPermission('admin:email:email:browse')) {
            unauthorised();
        }

        // --------------------------------------------------------------------------

        $oEmailer = Factory::service('Emailer', 'nails/module-email');

        // --------------------------------------------------------------------------

        //  Set method info
        $this->data['page']->title = 'Message Archive';

        // --------------------------------------------------------------------------

        //  Get pagination and search/sort variables
        $sPrefix    = $oEmailer->getTableAlias();
        $iPage      = $this->input->get('page') ? $this->input->get('page') : 0;
        $iPerPage   = $this->input->get('perPage') ? $this->input->get('perPage') : 50;
        $sSortOn    = $this->input->get('sortOn') ? $this->input->get('sortOn') : $sPrefix . '.sent';
        $sSortOrder = $this->input->get('sortOrder') ? $this->input->get('sortOrder') : 'desc';
        $sKeywords  = $this->input->get('keywords') ? $this->input->get('keywords') : '';

        // --------------------------------------------------------------------------

        //  Define the sortable columns
        $aSortColumns = [
            $sPrefix . '.sent' => 'Sent Date',
        ];

        // --------------------------------------------------------------------------

        $aTypeOptions = ['All email types'];
        $aEmailTypes  = $oEmailer->getTypes();
        foreach ($aEmailTypes as $oType) {
            $aTypeOptions[$oType->slug] = $oType->name;
        }

        $aCbFilters = [];
        $aDdFilters = [
            Helper::searchFilterObject(
                $sPrefix . '.type',
                'Type',
                $aTypeOptions
            ),
        ];

        // --------------------------------------------------------------------------

        //  Define the $data variable for the queries
        $aData = [
            'sort'      => [
                [$sSortOn, $sSortOrder],
            ],
            'keywords'  => $sKeywords,
            'ddFilters' => $aDdFilters,
        ];

        // --------------------------------------------------------------------------

        //  Get the items for the page
        $totalRows            = $oEmailer->countAll($aData);
        $this->data['aEmails'] = $oEmailer->getAll($iPage, $iPerPage, $aData);

        //  Set Search and Pagination objects for the view
        $this->data['oSearch']     = Helper::searchObject(
            true,
            $aSortColumns,
            $sSortOn,
            $sSortOrder,
            $iPerPage,
            $sKeywords,
            $aCbFilters,
            $aDdFilters
        );
        $this->data['oPagination'] = Helper::paginationObject($iPage, $iPerPage, $totalRows);

        // --------------------------------------------------------------------------

        Helper::loadView('index');
    }
1252121
protected function prepareBlogIndexViewData()
    {
        $postsPerPage = @$this->viewsData['postsPerPage'] ?: 5;

        $this->viewsData['nextPage'] = count($this->viewsData['blogPosts']) > $postsPerPage ? '/blog-page/2' : null;

        $this->viewsData['previousPage'] = null;

        $this->viewsData['paginatedBlogPosts'] = array_slice($this->viewsData['blogPosts'], 0, $postsPerPage, true);
    }
974597
public function index()
    {
        $entries = WinkTag::when(request()->has('search'), function ($q) {
            $q->where('name', 'LIKE', '%'.request('search').'%');
        })
            ->orderBy('created_at', 'DESC')
            ->withCount('posts')
            ->get();

        return TagsResource::collection($entries);
    }
1347040
protected function getTagsFromMySQL()
    {
        $queryParts = $this->getQueryParts();

        $queryBuilder = self::getQueryBuilder('tx_kesearch_index');
        $queryBuilder->getRestrictions()->removeAll();

        $tagRows = $queryBuilder
            ->select('tags')
            ->from($queryParts['FROM'])
            ->add('where', $queryParts['WHERE'])
            ->execute()
            ->fetchAll();

        return array_map(
            function ($row) {
                return $row['tags'];
            },
            $tagRows
        );
    }
134227
private function getAllTags(): array
    {
        if ($this->tags === null) {
            $this->tags = $this->loadAllTags();
        }

        return $this->tags;
    }
898108
protected static function fetchUserTags()
    {
        $files = Bus::fetch('resources/tags', false);
        //
        if (!is_null($files)) {
            foreach (Bus::fetch('resources/tags', false) as $file) {
                Bus::need($file);
            }
        }
    }
34305
public function index()
    {
        $visitors = Visitor::with(['user', 'device', 'agent', 'geoip', 'referer', 'cookie', 'language', 'activities'])
            ->paginate(50);

        $this->setTitle($title = trans('tracker::visitors.titles.visitors-list'));
        $this->addBreadcrumb($title);

        return $this->view('admin.visitors.index', compact('visitors'));
    }
799426
public static function loadTags() {
		
		// load defaults
		$tagDir = Config::getOption("sourceDir").DIRECTORY_SEPARATOR."_twig-components/tags";
		$tagExt = Config::getOption("twigTagExt");
		$tagExt = $tagExt ? $tagExt : "tag.php";
		
		if (is_dir($tagDir)) {
			
			// loop through the tags and instantiate the class...
			$finder = new Finder();
			$finder->files()->name("*\.".$tagExt)->in($tagDir);
			$finder->sortByName();
			foreach ($finder as $file) {
				
				// see if the file should be ignored or not
				$baseName = $file->getBasename();
				if ($baseName[0] != "_") {
					
					include($file->getPathname());
					
					// Project_{filenameBase}_TokenParser should be defined in the include
					$className = "Project_".$file->getBasename(".".$tagExt)."_TokenParser";
					self::$instance->addTokenParser(new $className());
					
				}
				
			}
			
		}
		
	}
1181024
public function tagged($tag)
    {
        $results = [];

        if (isset($this->tags[$tag])) {
            foreach ($this->tags[$tag] as $abstract) {
                $results[] = $this->make($abstract);
            }
        }

        return $results;
    }
562324
public function index()
    {
        //  Meta & Breadcrumbs
        $this->data['page']->title            = APP_NAME . ' Blog';
        $this->data['page']->seo->description = '';
        $this->data['page']->seo->keywords    = '';

        // --------------------------------------------------------------------------

        //  Handle pagination
        $page      = $this->uri->rsegment(3);
        $perPage  = appSetting('home_per_page', 'blog-' . $this->oBlog->id);
        $perPage  = $perPage ? $perPage : 10;

        $this->data['pagination']           = new stdClass();
        $this->data['pagination']->page     = $page;
        $this->data['pagination']->per_page = $perPage;

        // --------------------------------------------------------------------------

        //  Send any additional data
        $data                    = array();
        $data['include_body']    = !appSetting('use_excerpts', 'blog-' . $this->oBlog->id);
        $data['include_gallery'] = appSetting('home_show_gallery', 'blog-' . $this->oBlog->id);
        $data['sort']            = array('bp.published', 'desc');

        //  Only published items which are not schduled for the future
        $data['where']   = array();
        $data['where'][] = array('column' => 'blog_id',      'value' => $this->oBlog->id);
        $data['where'][] = array('column' => 'is_published', 'value' => true);
        $data['where'][] = array('column' => 'published <=', 'value' => 'NOW()', 'escape' => false);

        // --------------------------------------------------------------------------

        //  Load posts and count
        $this->data['posts'] = $this->blog_post_model->getAll($page, $perPage, $data);
        $this->data['pagination']->total = $this->blog_post_model->countAll($data);

        // --------------------------------------------------------------------------

        //  Widgets
        $this->fetchSidebarWidgets();

        // --------------------------------------------------------------------------

        $this->data['isIndex'] = true;

        // --------------------------------------------------------------------------

        //  Load views
        $oView = Factory::service('View');
        $oView->load('structure/header', $this->data);
        $this->loadView('browse', $this->data);
        $oView->load('structure/footer', $this->data);
    }