src/StringTagField.php
protected function getTags($term)
    {
        $items = [];
        foreach ($this->getOptions() as $i => $tag) {
            /** @var ArrayData $tag */
            $tagValue = $tag->Value;
            // Map into a distinct list (prevent duplicates)
            if (stripos($tagValue, $term) !== false && !array_key_exists($tagValue, $items)) {
                $items[$tagValue] = [
                    'id' => $tag->Title,
                    'text' => $tag->Value,
                ];
            }
        }
        // @todo do we actually need lazy loading limits for StringTagField?
        return array_slice(array_values($items), 0, $this->getLazyLoadItemLimit());
    }
protected function getTags($term)
    {
        $items = [];
        foreach ($this->getOptions() as $i => $tag) {
            /** @var ArrayData $tag */
            $tagValue = $tag->Value;
            // Map into a distinct list (prevent duplicates)
            if (stripos($tagValue, $term) !== false && !array_key_exists($tagValue, $items)) {
                $items[$tagValue] = [
                    'id' => $tag->Title,
                    'text' => $tag->Value,
                ];
            }
        }
        // @todo do we actually need lazy loading limits for StringTagField?
        return array_slice(array_values($items), 0, $this->getLazyLoadItemLimit());
    }
protected function getTags ( $ term ) { $ items = [ ] ; foreach ( $ this -> getOptions ( ) as $ i => $ tag ) { /** @var ArrayData $tag */ $ tagValue = $ tag -> Value ; // Map into a distinct list (prevent duplicates) if ( stripos ( $ tagValue , $ term ) !== false && ! array_key_exists ( $ tagValue , $ items ) ) { $ items [ $ tagValue ] = [ 'id' => $ tag -> Title , 'text' => $ tag -> Value , ] ; } } // @todo do we actually need lazy loading limits for StringTagField? return array_slice ( array_values ( $ items ) , 0 , $ this -> getLazyLoadItemLimit ( ) ) ; }
Returns array of arrays representing tags that partially match the given search term

@param string $term
@return array
Returns array of arrays representing tags that partially match the given search term