src/Helper.php
public static function searchFilterObject($sColumn, $sLabel, $aOptions)
    {
        //  @todo (Pablo - 2018-04-10) - DonRemove this helper and use factories directly
        $oFilter = Factory::factory('IndexFilter', 'nails/module-admin')
            ->setLabel($sLabel)
            ->setColumn($sColumn);

        foreach ($aOptions as $sIndex => $mOption) {

            if (is_array($mOption)) {
                $sLabel   = getFromArray(0, $mOption, null);
                $mValue   = getFromArray(1, $mOption, null);
                $bChecked = getFromArray(2, $mOption, false);
                $bQuery   = getFromArray(3, $mOption, false);
            } else {
                $sLabel   = $mOption;
                $mValue   = $sIndex;
                $bChecked = false;
                $bQuery   = false;
            }

            $oFilter->addOption($sLabel, $mValue, $bChecked, $bQuery);
        }

        return $oFilter;
    }
public static function searchFilterObject($sColumn, $sLabel, $aOptions)
    {
        //  @todo (Pablo - 2018-04-10) - DonRemove this helper and use factories directly
        $oFilter = Factory::factory('IndexFilter', 'nails/module-admin')
            ->setLabel($sLabel)
            ->setColumn($sColumn);

        foreach ($aOptions as $sIndex => $mOption) {

            if (is_array($mOption)) {
                $sLabel   = getFromArray(0, $mOption, null);
                $mValue   = getFromArray(1, $mOption, null);
                $bChecked = getFromArray(2, $mOption, false);
                $bQuery   = getFromArray(3, $mOption, false);
            } else {
                $sLabel   = $mOption;
                $mValue   = $sIndex;
                $bChecked = false;
                $bQuery   = false;
            }

            $oFilter->addOption($sLabel, $mValue, $bChecked, $bQuery);
        }

        return $oFilter;
    }
Creates a standard object designed for use with self::searchObject()'s
$checkboxFilter and $dropdownFilter parameters

@param  string $sColumn  The name of the column to filter on, leave blank if you do not wish to use Nails's
automatic filtering
@param  string $sLabel   The label to give the filter group
@param  array  $aOptions An array of options for the dropdown, either key => value pairs or a 3 element array: 0
= label, 1 = value, 2 = default check status

@return \stdClass
@throws \Nails\Common\Exception\FactoryException