Returns a list of Pico-specific Twig filters

@see Twig_ExtensionInterface::getFilters()

@return Twig_SimpleFilter[] array of Pico's Twig filters
508759
public function getFilters()
    {
        return array(
            'markdown' => new Twig_SimpleFilter('markdown', array($this, 'markdownFilter')),
            'map' => new Twig_SimpleFilter('map', array($this, 'mapFilter')),
            'sort_by' => new Twig_SimpleFilter('sort_by', array($this, 'sortByFilter')),
            'link' => new Twig_SimpleFilter('link', array($this->pico, 'getPageUrl'))
        );
    }
1066076
public function getFunctions()
    {
        return array_merge(parent::getFunctions(), [
            new \Twig_SimpleFunction('getBlockElementsHtml', [$this, 'getBlockElementsHtml'], ['is_safe' => ['html']]),
            new \Twig_SimpleFunction('getElementHtml', [$this, 'getElementHtml'], ['is_safe' => ['html']]),
            new \Twig_SimpleFunction('getCollectionPages', [$this, 'getCollectionPages']),
            new \Twig_SimpleFunction('getGallery', [$this, 'getGallery']),
        ]);
    }
1080950
private function getFilters()
    {
        $filters = [];

        $regions = [
            'fieldID' => 'region_id',
            'type' => 'dropDownList',
            'label' => trans('HCRegions::regions_countries.region'),
            'options' => HCContinents::all()->toArray(),
            'showNodes' => ['name'],
        ];

        $filters[] = addAllOptionToDropDownList($regions);

        return $filters;
    }
281831
public function getFilters(): array
    {
        return [
            new \Twig_SimpleFilter('toReadableSize', 'Cake\I18n\Number::toReadableSize'),
            new \Twig_SimpleFilter('fromReadableSize', 'Cake\I18n\Number::fromReadableSize'),
            new \Twig_SimpleFilter('toPercentage', 'Cake\I18n\Number::toPercentage'),
            new \Twig_SimpleFilter('number_format', 'Cake\I18n\Number::format'),
            new \Twig_SimpleFilter('formatDelta', 'Cake\I18n\Number::formatDelta'),
            new \Twig_SimpleFilter('currency', 'Cake\I18n\Number::currency'),
            new TwigFilter('toReadableSize', 'Cake\I18n\Number::toReadableSize'),
            new TwigFilter('fromReadableSize', 'Cake\I18n\Number::fromReadableSize'),
            new TwigFilter('toPercentage', 'Cake\I18n\Number::toPercentage'),
            new TwigFilter('format', 'Cake\I18n\Number::format'),
            new TwigFilter('formatDelta', 'Cake\I18n\Number::formatDelta'),
            new TwigFilter('currency', 'Cake\I18n\Number::currency'),
        ];
    }
227327
public function get_filters() {
        $filterkeys = [
            ASSIGN_FILTER_SUBMITTED,
            ASSIGN_FILTER_NOT_SUBMITTED,
            ASSIGN_FILTER_REQUIRE_GRADING,
            ASSIGN_FILTER_GRANTED_EXTENSION
        ];

        $current = get_user_preferences('assign_filter', '');

        $filters = [];
        // First is always "no filter" option.
        array_push($filters, [
            'key' => 'none',
            'name' => get_string('filternone', 'assign'),
            'active' => ($current == '')
        ]);

        foreach ($filterkeys as $key) {
            array_push($filters, [
                'key' => $key,
                'name' => get_string('filter' . $key, 'assign'),
                'active' => ($current == $key)
            ]);
        }
        return $filters;
    }
957585
public function getFilters()
    {
        return [
            new Twig_SimpleFilter('print_convert_money', [
                $this->moneyPrinter,
                'printConvertMoney',
            ]),
            new Twig_SimpleFilter('print_money', [
                $this->moneyPrinter,
                'printMoney',
            ]),
            new Twig_SimpleFilter('print_money_from_value', [
                $this->moneyPrinter,
                'printMoneyFromValue',
            ]),
        ];
    }
74275
protected function getFilterArray()
    {
        return array_merge(parent::getFilterArray(), [
      self::ARGUMENT_FILTER_OFFSET => $this->arguments[self::ARGUMENT_FILTER_OFFSET],
      self::ARGUMENT_FILTER_LIMIT => $this->arguments[self::ARGUMENT_FILTER_LIMIT],
      self::ARGUMENT_FILTER_TYPES => $this->arguments[self::ARGUMENT_FILTER_TYPES],
      self::ARGUMENT_FILTER_NAME => $this->arguments[self::ARGUMENT_FILTER_NAME],
      self::ARGUMENT_FILTER_CATEGORYID => $this->arguments[self::ARGUMENT_FILTER_CATEGORYID],
      self::ARGUMENT_FILTER_REPERTOIREID => $this->arguments[self::ARGUMENT_FILTER_REPERTOIREID],
      self::ARGUMENT_FILTER_LOCATION => $this->arguments[self::ARGUMENT_FILTER_LOCATION]
    ]);
    }
797679
public static function getFilter(string $type): array
    {
        return isset(self::$filters[$type]) ? self::$filters[$type] : [];
    }
1170497
public function getFilters()
    {
        $filters = [];
        foreach ($this->getFields() as $field) {
            $filters[$field->getName()] = $field->getFilters();
        }

        return $filters;
    }
417117
public function getFunctions() {
        return [
            new Twig_SimpleFunction(
                'plupload',
                function($view = null, $browse_button = null, $prefix = null, $additional_data = array()){

                    $view = (true === is_null($view)) ? \Config::get('plupload::plupload.view') : $view;
                    $prefix = (true === is_null($prefix)) ? 'plupload_'.uniqid() : $prefix;
                    $browse_button = (true === is_null($browse_button)) ? $prefix.'_browse' : $browse_button;

                    return \View::make($view, array(
                        'upload_handler' => \Config::get('plupload::plupload.upload_handler'),
                        'browse_button_id' => $browse_button,
                        'prefix' => $prefix,
                        'handler_gate' => \Config::get('plupload::plupload.upload_handler_gate'),
                        'max_file_size' => \Config::get('plupload::plupload.max_file_size'),
                        'additional_data' => $additional_data,
                    ));
                }
            )
        ];
    }
780519
public function getTwigExtras()
    {
        $list = array();
        foreach ($this->getManager()->getModules() as $module) {
            foreach ($module->getTwigExtras() as $extra) {
                $list[] = $extra;
            }
        }
        return $list;
    }
416995
public function getFilters()
    {
        // default filters are empty
        $filters = [];

        // if custom filters have been set, use them
        if (!is_null($this->filters)) {
            return $this->filters;
        }

        // if no custom filters have been set, and there are
        // Taxonomies assigned to the PostType
        if (is_null($this->filters) && !empty($this->taxonomies)) {
            // create filters for each taxonomy assigned to the PostType
            return $this->taxonomies;
        }

        return $filters;
    }
1136733
public function getFilters()
    {
        return [
            /**
             * Formatting filters.
             */
            new \Twig_Filter('wpantispam', function ($email, $encoding = 0) {
                return antispambot($email, $encoding);
            }),
            new \Twig_Filter('wpautop', function ($text, $br = true) {
                return wpautop($text, $br);
            }),
            new \Twig_Filter('wpnofollow', function ($text) {
                return wp_rel_nofollow($text);
            }),
            new \Twig_Filter('wptrimexcerpt', function ($text) {
                return wp_trim_excerpt($text);
            }),
            new \Twig_Filter('wptrimwords', function ($text, $num_words = 55, $more = null) {
                return wp_trim_words($text, $num_words, $more);
            }),
            new \Twig_Filter('zeroise', function ($number, $treshold = 4) {
                return zeroise($number, $treshold);
            })
        ];
    }
1111368
public function allFilters()
    {
        $filters = [];
        foreach ($this->extensions() as $ext) {
            if (empty($this->_data[$ext][self::FILTERS])) {
                continue;
            }
            $filters = array_merge($filters, $this->_data[$ext][self::FILTERS]);
        }
        foreach ($this->_targets as $target) {
            if (empty($target[self::FILTERS])) {
                continue;
            }
            $filters = array_merge($filters, $target[self::FILTERS]);
        }
        return array_unique($filters);
    }
145063
public function getFilters()
    {
        return [
            new Twig_SimpleFilter('gravatar_profile_url', function ($email) {
                try {
                    $profile = $this->client->getProfile($email);
                } catch (ClientException $exception) {
                    return;
                }

                return $profile['profileUrl'];
            }),
            new Twig_SimpleFilter('gravatar_url', [$this->client, 'getAvatarUrl']),
        ];
    }
103255
public function getFunctions(): array
    {
        $options = ['is_safe' => ['html']];
        return [
            new Twig_Function('logged_in_user', [$this, 'getLoggedInUser'], $options),
            new Twig_Function('msg', [$this, 'msg'], $options),
            new Twig_Function('bdi', [$this, 'bdi'], $options),
            new Twig_Function('msg_exists', [$this, 'msgExists'], $options),
            new Twig_Function('msg_if_exists', [$this, 'msgIfExists'], $options),
            new Twig_Function('lang', [$this, 'getLang'], $options),
            new Twig_Function('lang_name', [$this, 'getLangName'], $options),
            new Twig_Function('all_langs', [$this, 'getAllLangs']),
            new Twig_Function('is_rtl', [$this, 'isRtl']),
            new Twig_Function('git_branch', [$this, 'gitBranch']),
            new Twig_Function('git_hash', [$this, 'gitHash']),
            new Twig_Function('git_hash_short', [$this, 'gitHashShort']),
        ];
    }
1210608
public function getFilters(): Collection
    {
        $filters = collect();
        foreach ($this->filters() as $filter) {
            $filter = new $filter($this);
            $filters->push($filter);
        }

        return $filters;
    }