Select::normalizeOptions: Bitrix method

      
<?php 
//  Bitrix\Bizproc\BaseType\Select :: normalizeOptions()
//  /dist/bitrix/modules/bizproc/lib/basetype/select.php:464

    
protected static function normalizeOptions($options)
    {
        
$normalized = array();
        if (
is_array($options))
        {
            foreach (
$options as $key => $value)
            {
                if (
is_array($value) && sizeof($value) == 2)
                {
                    
$v array_values($value);
                    
$key $v[0];
                    
$value $v[1];
                }
                
$normalized[$key] = $value;
            }
        }
        else
            
$normalized[$options] = $options;
        return 
$normalized;
    }