public function generateLabels($attributes)
    {
        $labels = [];
        foreach ($attributes as $attribute) {
            if (!strcasecmp($attribute, '_id')) {
                $label = 'ID';
            } else {
                $label = Inflector::camel2words($attribute);
                if (substr_compare($label, ' id', -3, 3, true) === 0) {
                    $label = substr($label, 0, -3) . ' ID';
                }
            }
            $labels[$attribute] = $label;
        }

        return $labels;
    }
public function generateLabels($attributes)
    {
        $labels = [];
        foreach ($attributes as $attribute) {
            if (!strcasecmp($attribute, '_id')) {
                $label = 'ID';
            } else {
                $label = Inflector::camel2words($attribute);
                if (substr_compare($label, ' id', -3, 3, true) === 0) {
                    $label = substr($label, 0, -3) . ' ID';
                }
            }
            $labels[$attribute] = $label;
        }

        return $labels;
    }
public function generateLabels ( $ attributes ) { $ labels = [ ] ; foreach ( $ attributes as $ attribute ) { if ( ! strcasecmp ( $ attribute , '_id' ) ) { $ label = 'ID' ; } else { $ label = Inflector :: camel2words ( $ attribute ) ; if ( substr_compare ( $ label , ' id' , - 3 , 3 , true ) === 0 ) { $ label = substr ( $ label , 0 , - 3 ) . ' ID' ; } } $ labels [ $ attribute ] = $ label ; } return $ labels ; }
Generates the attribute labels for the specified attributes list.
@param array $attributes the list of attributes
@return array the generated attribute labels (name => label)
Generates the attribute labels for the specified attributes list .