protected function indexDropdownFilters(): array
    {
        $aFilters = [];
        if (classUses(static::getModel(), Localised::class)) {

            /** @var Locale $oLocale */
            $oLocale = Factory::service('Locale');

            $aOptions   = [];
            $aOptions[] = Factory::factory('IndexFilterOption', 'nails/module-admin')
                ->setLabel('All Locales');

            foreach ($oLocale->getSupportedLocales() as $oSupportedLocale) {
                $aOptions[] = Factory::factory('IndexFilterOption', 'nails/module-admin')
                    ->setLabel($oSupportedLocale->getDisplayLanguage())
                    ->setValue($oSupportedLocale->getLanguage() . '_' . $oSupportedLocale->getRegion());
            }

            $aFilters[] = Factory::factory('IndexFilter', 'nails/module-admin')
                ->setLabel('Locale')
                ->setColumn('CONCAT(`language`, \'_\', `region`)')
                ->addOptions($aOptions);
        }

        return $aFilters;
    }
protected function indexDropdownFilters(): array
    {
        $aFilters = [];
        if (classUses(static::getModel(), Localised::class)) {

            /** @var Locale $oLocale */
            $oLocale = Factory::service('Locale');

            $aOptions   = [];
            $aOptions[] = Factory::factory('IndexFilterOption', 'nails/module-admin')
                ->setLabel('All Locales');

            foreach ($oLocale->getSupportedLocales() as $oSupportedLocale) {
                $aOptions[] = Factory::factory('IndexFilterOption', 'nails/module-admin')
                    ->setLabel($oSupportedLocale->getDisplayLanguage())
                    ->setValue($oSupportedLocale->getLanguage() . '_' . $oSupportedLocale->getRegion());
            }

            $aFilters[] = Factory::factory('IndexFilter', 'nails/module-admin')
                ->setLabel('Locale')
                ->setColumn('CONCAT(`language`, \'_\', `region`)')
                ->addOptions($aOptions);
        }

        return $aFilters;
    }
protected function indexDropdownFilters ( ) : array { $ aFilters = [ ] ; if ( classUses ( static :: getModel ( ) , Localised :: class ) ) { /** @var Locale $oLocale */ $ oLocale = Factory :: service ( 'Locale' ) ; $ aOptions = [ ] ; $ aOptions [ ] = Factory :: factory ( 'IndexFilterOption' , 'nails/module-admin' ) -> setLabel ( 'All Locales' ) ; foreach ( $ oLocale -> getSupportedLocales ( ) as $ oSupportedLocale ) { $ aOptions [ ] = Factory :: factory ( 'IndexFilterOption' , 'nails/module-admin' ) -> setLabel ( $ oSupportedLocale -> getDisplayLanguage ( ) ) -> setValue ( $ oSupportedLocale -> getLanguage ( ) . '_' . $ oSupportedLocale -> getRegion ( ) ) ; } $ aFilters [ ] = Factory :: factory ( 'IndexFilter' , 'nails/module-admin' ) -> setLabel ( 'Locale' ) -> setColumn ( 'CONCAT(`language`, \'_\', `region`)' ) -> addOptions ( $ aOptions ) ; } return $ aFilters ; }
Any dropdown style filters to include on the index page

@return array
Any dropdown style filters to include on the index page