Passed
Push — master ( c93b57...c44512 )
by Iman
07:27 queued 03:38
created

ViewHelpers::delConfirm()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 1
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace crocodicstudio\crudbooster\CBCoreModule;
4
5
class ViewHelpers
6
{
7
    public static function getUrlParameters($exception = null)
8
    {
9
        @$get = $_GET;
10
11
        if (! $get) {
12
            return '';
13
        }
14
        if (is_array($exception)) {
15
            foreach ($exception as $e) {
16
                unset($get[$e]);
17
            }
18
        }
19
20
        $inputhtml = '';
21
        $string_params = http_build_query($get);
22
        foreach (explode('&', $string_params) as $s) {
23
            $part = explode('=', $s);
24
            $name = urldecode($part[0]);
25
            $value = urldecode($part[1]);
26
            $inputhtml .= "<input type='hidden' name='$name' value='$value'/>";
27
        }
28
29
        return $inputhtml;
30
    }
31
}