"Fossies" - the Fresh Open Source Software Archive

Member "phpMyAdmin-5.1.0-all-languages/libraries/classes/Twig/PluginsExtension.php" (24 Feb 2021, 1043 Bytes) of package /linux/www/phpMyAdmin-5.1.0-all-languages.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "PluginsExtension.php": 5.0.4-english_vs_5.1.0-english.

    1 <?php
    2 
    3 declare(strict_types=1);
    4 
    5 namespace PhpMyAdmin\Twig;
    6 
    7 use Twig\Extension\AbstractExtension;
    8 use Twig\TwigFunction;
    9 
   10 class PluginsExtension extends AbstractExtension
   11 {
   12     /**
   13      * Returns a list of functions to add to the existing list.
   14      *
   15      * @return TwigFunction[]
   16      */
   17     public function getFunctions()
   18     {
   19         return [
   20             new TwigFunction(
   21                 'checkbox_check',
   22                 'PhpMyAdmin\Plugins::checkboxCheck',
   23                 ['is_safe' => ['html']]
   24             ),
   25             new TwigFunction(
   26                 'get_choice',
   27                 'PhpMyAdmin\Plugins::getChoice',
   28                 ['is_safe' => ['html']]
   29             ),
   30             new TwigFunction(
   31                 'get_default_plugin',
   32                 'PhpMyAdmin\Plugins::getDefault',
   33                 ['is_safe' => ['html']]
   34             ),
   35             new TwigFunction(
   36                 'get_options',
   37                 'PhpMyAdmin\Plugins::getOptions',
   38                 ['is_safe' => ['html']]
   39             ),
   40         ];
   41     }
   42 }