src/Charcoal/Admin/Script/Object/Table/AlterPrimaryKeyScript.php
protected function labelFromProp(IdProperty $prop)
    {
        $mode = $prop->mode();
        switch ($mode) {
            case IdProperty::MODE_AUTO_INCREMENT:
                return 'auto-increment ID';

            case IdProperty::MODE_CUSTOM:
                return 'custom ID';

            default:
                $label = $this->labelFromMode($mode);
                if ($label) {
                    return sprintf('auto-generated ID (%s)', $label);
                } else {
                    return 'auto-generated ID';
                }
        }

        return null;
    }
protected function labelFromProp(IdProperty $prop)
    {
        $mode = $prop->mode();
        switch ($mode) {
            case IdProperty::MODE_AUTO_INCREMENT:
                return 'auto-increment ID';

            case IdProperty::MODE_CUSTOM:
                return 'custom ID';

            default:
                $label = $this->labelFromMode($mode);
                if ($label) {
                    return sprintf('auto-generated ID (%s)', $label);
                } else {
                    return 'auto-generated ID';
                }
        }

        return null;
    }
protected function labelFromProp ( IdProperty $ prop ) { $ mode = $ prop -> mode ( ) ; switch ( $ mode ) { case IdProperty :: MODE_AUTO_INCREMENT : return 'auto-increment ID' ; case IdProperty :: MODE_CUSTOM : return 'custom ID' ; default : $ label = $ this -> labelFromMode ( $ mode ) ; if ( $ label ) { return sprintf ( 'auto-generated ID (%s)' , $ label ) ; } else { return 'auto-generated ID' ; } } return null ; }
Retrieve a label for the property.

@param  IdProperty $prop The new ID property to analyse.
@return string|null
Retrieve a label for the property .