MetaModels\Filter\Setting\SimpleLookup::getParameterFilterOptions PHP Method

getParameterFilterOptions() protected method

Internal helper function for descendant classes to retrieve the options.
protected getParameterFilterOptions ( MetaModels\Attribute\IAttribute $objAttribute, string[] | null $arrIds, array &$arrCount = null ) : array
$objAttribute MetaModels\Attribute\IAttribute The attribute to search.
$arrIds string[] | null The Id list of items for which to retrieve the options.
$arrCount array If non null, the amount of matches will get returned.
return array
    protected function getParameterFilterOptions($objAttribute, $arrIds, &$arrCount = null)
    {
        $arrOptions = $objAttribute->getFilterOptions($this->get('onlypossible') ? $arrIds : null, (bool) $this->get('onlyused'), $arrCount);
        // Remove empty values.
        foreach ($arrOptions as $mixOptionKey => $mixOptions) {
            // Remove html/php tags.
            $mixOptions = strip_tags($mixOptions);
            $mixOptions = trim($mixOptions);
            if ($mixOptions === '' || $mixOptions === null) {
                unset($arrOptions[$mixOptionKey]);
            }
        }
        return $arrOptions;
    }