Skip to content
Snippets Groups Projects
Select Git revision
  • ce340c5c9724c2a578a2046eabf7a09828ee8021
  • main default protected
  • renovate/lock-file-maintenance
  • demo protected
  • person-select-custom
  • dbp-translation-component
  • icon-set-mapping
  • port-i18next-parser
  • remove-sentry
  • favorites-and-recent-files
  • revert-6c632dc6
  • lit2
  • advertisement
  • wc-part
  • automagic
  • publish
  • wip-cleanup
  • demo-file-handling
18 results

dbp-file-source.js

Blame
  • StringExpressionFunctionProvider.php 791 B
    <?php
    
    declare(strict_types=1);
    
    namespace Dbp\Relay\CoreBundle\ExpressionLanguage\ExpressionFunctionProviders;
    
    use Dbp\Relay\CoreBundle\Helpers\Tools;
    use Symfony\Component\ExpressionLanguage\ExpressionFunction;
    use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
    
    class StringExpressionFunctionProvider implements ExpressionFunctionProviderInterface
    {
        public function getFunctions(): array
        {
            return [
                new ExpressionFunction('isNullOrEmpty',
                    function (string $varName): string {
                        return sprintf('isNullOrEmpty(%s)', $varName);
                    },
                    function ($arguments, $varName): bool {
                        return Tools::isNullOrEmpty($varName);
                    }),
            ];
        }
    }