Returns all terms that have the given term type, or empty array if none.
@param string $termType
@return Term[]
328681
public function getAll($termType) {
        $arr = array();
        foreach ($this->terms as $term) {
            if ((string)$term->getTermType() === $termType) {
                array_push($arr, $term);
            }
        }
        return $arr;
    }
158393
public function getTypes(DocType $varType): array
    {
        $types = [];
        $nullable = false;

        if ($varType instanceof Nullable) {
            $nullable = true;
            $varType = $varType->getActualType();
        }

        if (!$varType instanceof Compound) {
            if ($varType instanceof Null_) {
                $nullable = true;
            }

            $type = $this->createType($varType, $nullable);
            if (null !== $type) {
                $types[] = $type;
            }

            return $types;
        }

        $varTypes = [];
        for ($typeIndex = 0; $varType->has($typeIndex); ++$typeIndex) {
            $type = $varType->get($typeIndex);

            // If null is present, all types are nullable
            if ($type instanceof Null_) {
                $nullable = true;
                continue;
            }

            $varTypes[] = $type;
        }

        foreach ($varTypes as $varType) {
            $type = $this->createType($varType, $nullable);
            if (null !== $type) {
                $types[] = $type;
            }
        }

        return $types;
    }
1160042
protected function getTags($term)
    {
        $source = $this->getSourceList();

        $titleField = $this->getTitleField();

        $query = $source
            ->filter($titleField . ':PartialMatch:nocase', $term)
            ->sort($titleField)
            ->limit($this->getLazyLoadItemLimit());

        // Map into a distinct list
        $items = [];
        $titleField = $this->getTitleField();
        foreach ($query->map('ID', $titleField) as $id => $title) {
            $items[$title] = [
                'id' => $title,
                'text' => $title,
            ];
        }

        return array_values($items);
    }
1354287
protected function get_term_ids( $taxonomy ) {
		$terms = get_the_terms( $this->get_id(), $taxonomy );

		if ( false === $terms || is_wp_error( $terms ) ) {
			return [];
		}

		return wp_list_pluck( $terms, 'term_id' );
	}
438378
public function getTerms($taxonomy = '')
    {
        if ($taxonomy) {
            $term_ids = $this->taxonomies->where('taxonomy', $taxonomy)->pluck('term_id');
        } else {
            $term_ids = $this->getTaxonomies('term_id');
        }

        return Term::whereIn('id', $term_ids)->get();
    }
1156338
public function getSearchFilters($term)
    {
        $filters = [];
        
        foreach ($this->getSearchFields() as $field) {
            $filters[$this->getSearchFilterName($field)] = $term;
        }
        
        return $filters;
    }
288394
public function findElementtypeByType($type)
    {
        $elementtypes = [];
        foreach ($this->elementtypeManager->findAll() as $elementtype) {
            if ($elementtype->getType() === $type) {
                $elementtypes[] = $elementtype;
            }
        }

        return $elementtypes;
    }
986960
public function getListedElements ($elementType)
    {
        $allElements = $this->getAllElements($elementType);
        usort($allElements,
            function (Element $element1, Element $element2)
            {
                return strnatcasecmp($element1->getKey(), $element2->getKey());
            }
        );

        return array_filter(
            $allElements,
            function (Element $element)
            {
                return !$element->isHidden();
            }
        );
    }
1021561
public function getContentTypeTaxonomy($contenttypeslug)
    {
        $contenttype = $this->getContentType($contenttypeslug);

        if (empty($contenttype['taxonomy'])) {
            return [];
        } else {
            $taxokeys = $contenttype['taxonomy'];

            $taxonomy = [];

            foreach ($taxokeys as $key) {
                if ($this->app['config']->get('taxonomy/' . $key)) {
                    $taxonomy[$key] = $this->app['config']->get('taxonomy/' . $key);
                }
            }

            return $taxonomy;
        }
    }
1210000
public function knownExtensions($type = null)
    {
        $extensions = [
            'images'   => static::$imageExtensions,
            'audios'    => static::$audiosExtensions,
            'archives' => static::$archivesExtensions,
            'videos'   => static::$videosExtensions,
        ];

        if ($type) {
            if (in_array($type, array_keys($extensions))) {
                return $extensions[$type];
            }

            return null;
        }

        return $extensions;
    }
391715
public function findByType($type)
    {
        $results = [];
        foreach ($this->columns as $name => $column) {
            if ($column->getType() == $type) {
                $results[] = $name;
            }
        }

        return new Result($results, $this->columns);
    }
241024
public function clear($type = null)
    {
        if (false === $this->mf->hasCache()) {
            return [];
        }
        return $this->doClear($this->getTypes($type));
    }
866875
public final ImmutableList<TaxonomyTerm> terms(final String taxonomy) {
      ImmutableList<TaxonomyTerm> terms = taxonomyTerms.get(taxonomy);
      return terms != null ? terms : ImmutableList.of();
   }
23584
protected function getKeywords($type)
    {
        if (!isset($this->keywordsCache[$type])) {
            $getter = 'get' . $type . 'Keywords';
            $keywords = $this->keywords->$getter();

            if ('Step' === $type) {
                $padded = array();
                foreach (explode('|', $keywords) as $keyword) {
                    $padded[] = false !== mb_strpos($keyword, '<', 0, 'utf8')
                        ? preg_quote(mb_substr($keyword, 0, -1, 'utf8'), '/') . '\s*'
                        : preg_quote($keyword, '/') . '\s+';
                }

                $keywords = implode('|', $padded);
            }

            $this->keywordsCache[$type] = $keywords;
        }

        return $this->keywordsCache[$type];
    }
575533
public function getFilteredDefinitions($type) {
    $all = $this->getDefinitions();

    return array_filter($all, function ($definition) use ($type) {
      return $definition['type'] === $type;
    });
  }
1137531
public function get($type = null)
    {
        $result = [];

        foreach ($this->session[$this->prefix] as $offset => $message) {
            if ($type === null || $message['type'] === $type) {
                $result[] = $message;
                unset($this->session[$this->prefix][$offset]);
            }
        }

        return $result;
    }
404936
public function actionList($type, $term)
    {
    	$tags = Tag::find()->where('type = :type AND LOWER(name) LIKE :term AND status<>"deleted"', [':type' => $type, ':term' => '%' . strtolower($term) . '%'])->all();
    	$response = [];
    	foreach($tags as $tag) {
    		$response[] = ["id" => $tag->id, "label" => $tag->name, "value" => $tag->name];
    	}
        Yii::$app->response->format = 'json';
        return $response;
    }