LightnCandy\Validator::blockCustomHelper PHP Method

blockCustomHelper() protected static method

validate block custom helper token
protected static blockCustomHelper ( array\arraystring | integer> &$context, arrayinteger | string | array> $vars, boolean $inverted = false ) : integer | null
$context array\arraystring | integer>
$vars arrayinteger | string | array>
$inverted boolean the logic will be inverted
return integer | null Return number of used custom helpers
    protected static function blockCustomHelper(&$context, $vars, $inverted = false)
    {
        if (is_string($vars[0][0])) {
            if (static::resolveHelper($context, $vars[0][0])) {
                return ++$context['usedFeature']['helper'];
            }
        }
    }