CommonITILObject::dropdownStatus PHP Метод

dropdownStatus() статический публичный Метод

Dropdown of object status
static public dropdownStatus ( array $options = [] ) : nothing
$options array array of options - name : select name (default is status) - value : default value (default self::INCOMING) - showtype : list proposed : normal, search or allowed (default normal) - display : boolean if false get string
Результат nothing (display)
    static function dropdownStatus(array $options = array())
    {
        $p['name'] = 'status';
        $p['value'] = self::INCOMING;
        $p['showtype'] = 'normal';
        $p['display'] = true;
        if (is_array($options) && count($options)) {
            foreach ($options as $key => $val) {
                $p[$key] = $val;
            }
        }
        switch ($p['showtype']) {
            case 'allowed':
                $tab = static::getAllowedStatusArray($p['value']);
                break;
            case 'search':
                $tab = static::getAllStatusArray(true);
                break;
            default:
                $tab = static::getAllStatusArray(false);
                break;
        }
        return Dropdown::showFromArray($p['name'], $tab, $p);
    }
CommonITILObject