src/DcGeneral/Data/Driver.php
public function getFilterOptions(ConfigInterface $objConfig)
    {
        $arrProperties = $objConfig->getFields();
        if (count($arrProperties) <> 1) {
            throw new \RuntimeException('objConfig must contain exactly one property to be retrieved.');
        }

        $objFilter = $this->prepareFilter($objConfig);

        $arrValues = $this
            ->getMetaModel()
            ->getAttribute($arrProperties[0])
            ->getFilterOptions($objFilter->getMatchingIds(), true);

        $objCollection = new DefaultFilterOptionCollection();
        foreach ($arrValues as $strKey => $strValue) {
            $objCollection->add($strKey, $strValue);
        }

        return $objCollection;
    }
public function getFilterOptions(ConfigInterface $objConfig)
    {
        $arrProperties = $objConfig->getFields();
        if (count($arrProperties) <> 1) {
            throw new \RuntimeException('objConfig must contain exactly one property to be retrieved.');
        }

        $objFilter = $this->prepareFilter($objConfig);

        $arrValues = $this
            ->getMetaModel()
            ->getAttribute($arrProperties[0])
            ->getFilterOptions($objFilter->getMatchingIds(), true);

        $objCollection = new DefaultFilterOptionCollection();
        foreach ($arrValues as $strKey => $strValue) {
            $objCollection->add($strKey, $strValue);
        }

        return $objCollection;
    }
public function getFilterOptions ( ConfigInterface $ objConfig ) { $ arrProperties = $ objConfig -> getFields ( ) ; if ( count ( $ arrProperties ) <> 1 ) { throw new \ RuntimeException ( 'objConfig must contain exactly one property to be retrieved.' ) ; } $ objFilter = $ this -> prepareFilter ( $ objConfig ) ; $ arrValues = $ this -> getMetaModel ( ) -> getAttribute ( $ arrProperties [ 0 ] ) -> getFilterOptions ( $ objFilter -> getMatchingIds ( ) , true ) ; $ objCollection = new DefaultFilterOptionCollection ( ) ; foreach ( $ arrValues as $ strKey => $ strValue ) { $ objCollection -> add ( $ strKey , $ strValue ) ; } return $ objCollection ; }
Retrieve all unique values for the given property.

The result set will be an array containing all unique values contained in the MetaModel for the defined
attribute in the configuration.

Note: this only re-ensembles really used values for at least one data set.

The only information being interpreted from the passed config object is the first property to fetch and the
filter definition.

@param ConfigInterface $objConfig The filter config options.

@return FilterOptionCollectionInterface

@throws \RuntimeException If improper values have been passed (i.e. not exactly one field requested).
Retrieve all unique values for the given property .