Returns a list of available tags or domains.

@param string $type

@return array
347913
private function getGroupTypeInfo($type)
    {
        $search = $this->repository->createSearch();
        $search->addAggregation(new TermsAggregation($type, $type));
        $result = $this->repository->findDocuments($search);
        $aggregation = $result->getAggregation($type);
        $items = [];

        foreach ($aggregation as $item) {
            $items[] = $item['key'];
        }

        return $items;
    }
1147116
public function getServiceInstanceByType($type)
    {
        $services = [];
        $instances  = $this->getServiceInstances();

        foreach ($this->getServiceNamesByType($type) as $name) {
            if (!isset($instances[$name]['instance'])) {
                continue;
            }
            $services[] = $instances[$name]['instance'];
        }

        return $services;
    }
651001
private function getBiodata($type)
    {
        if ($type == 'Website') {
            preg_match('/('.$type.":<\/span> <a)[^<]*/", $this->_biodata, $biodata);
            if ($biodata) {
                preg_match('/".+"/', $biodata[0], $biodata);
                if ($biodata[0] != '"http://"') {
                    return str_replace('"', '', $biodata[0]);
                }
            }
        }

        preg_match('/('.$type.":<\/span>)[^<]*/", $this->_biodata, $biodata);

        if ($biodata) {
            $biodata = strip_tags($biodata[0]);
            $biodata = explode(': ', $biodata);
            $biodata = trim($biodata[1]);

            if ($type == 'Alternate names') {
                return explode(', ', $biodata);
            }

            if ($type == 'Member Favorites') {
                return str_replace(',', '', $biodata);
            }

            return $biodata;
        }
    }
45044
public function tags($taxonomytype)
    {
        $table = $this->getOption('general/database/prefix');
        $table .= 'taxonomy';

        $query = $this->createQueryBuilder()
            ->select("DISTINCT $table.name")
            ->from($table)
            ->where('taxonomytype = :taxonomytype')
            ->orderBy('name', 'ASC')
            ->setParameters([
                ':taxonomytype' => $taxonomytype,
            ]);

        $results = $query->execute()->fetchAll();

        return $this->json($results);
    }
919489
protected function ftFilter($type)
    {
        if ($type === Column::TYPE_TEXT)
        {
            return array_map(function ($v) {
                return trim($v, '%');
            }, $this->searcher->query);
        }
        return $this->searcher->query;

    }
291693
public function getAnnotationsByType($type)
    {
        $annotations = [];
        foreach ($this->annotations as $an) {
            if ($an->getName() == $type) {
                $annotations[] = $an;
            }
        }

        return $annotations;
    }
1110867
public function resources(String $type = null)
    {
        return [
            'resources' => collect(Storage::files($this->uploadFolder))
                ->filter(function ($file) {
                    return !str_is("{$this->uploadFolder}.*", $file);
                })
                ->map(function ($file) {
                    $fileParts = pathinfo($file);

                    return [
                        'public_id' => array_get($fileParts, 'filename'),
                        'format' => array_get($fileParts, 'extension'),
                    ];
                })->all()
            ];
    }
45810
public function getPostsByTag($tag)
    {
        if (false === array_key_exists($tag, $this->tagsIndex)) {
            return [];
        }

        $postNames = $this->tagsIndex[$tag];

        return $this->getPostsByName($postNames);
    }
669520
public function getUnitNames($type = null)
    {
        $names = array();
        foreach ($this->getUnits($type) as $key => $value) {
            $names[$key] = $value['name'];
        }

        return $names;
    }
481883
public function getValues($type = null)
    {
        if ($type == null) {
            return $this->values;
        }

        $converter  = $this->converterFactory->getConverter($type);
        $resultList = [];

        foreach ($this->values as $riakObject) {
            $reference = new RiakObjectReference($riakObject, $this->location, $type);
            $converted = $converter->toDomain($reference);

            $resultList[] = $converted;
        }

        return new DomainObjectList($resultList);
    }
619880
public function getTags(): array
    {
        $tsfe = $this->getTsfe();
        if (!($tsfe instanceof TypoScriptFrontendController)) {
            return [];
        }

        return \array_unique((array)ObjectAccess::getProperty($tsfe, 'pageCacheTags', true));
    }
641717
private function getOperators($type)
    {
        $choices = [
            ChoiceType::TYPE_CONTAINS => ['must', 'terms'],
            ChoiceType::TYPE_NOT_CONTAINS => ['must_not', 'terms'],
        ];

        return $choices[$type] ?? false;
    }
547784
public function getByType(Type $type)
    {
        $sites = $this->entityManager->getRepository('Concrete\Core\Entity\Site\Site')
            ->findByType($type);
        $return = [];
        foreach ($sites as $site) {
            $factory = new Factory($this->config);
            $return[] = $factory->createEntity($site);
        }

        return $return;
    }
329256
private function getTypeList($type)
    {
        $typeList = [];

        $counter = 1;
        while ($type !== 0) {
            if (($type & $counter) !== 0) {
                $typeList[] = $counter;
            }
            $type &= ~$counter;
            $counter <<= 1;
        }
        if (0 === count($typeList)) {
            $typeList[] = HolidayType::OTHER;
        }

        return $typeList;
    }
1063532
private static function get_cookie_settings($type) {
	$name      = self::get_cookie_name($type);
	$duration  = self::$type_durations[$type];
	$domain    = $_SERVER['SERVER_NAME'];
	$path      = '/';
	$secure    = !empty($_SERVER['HTTPS']) ? true : false;
	$http_only = true;
	
	return [
		'name'      => $name,
		'duration'  => $duration,
		'domain'    => $domain,
		'path'      => $path,
		'secure'    => $secure,
		'http_only' => $http_only,
	];
}
1133440
private function getLinkHref(string $type): array
    {
        if (empty($this->feedUris[$type])) {
            $this->findFeedUrls();
        }

        return array_values($this->feedUris[$type]);
    }
1162292
protected function getDomains() {
        if (!$this->_domains) {
            $this->_domains = new DomainList($this->version, $this->solution['accountSid']);
        }

        return $this->_domains;
    }