protected function createValue($model)
    {
        if ($this->identifierAsIndex) {
            return (string) current($this->getIdentifierValues($model));
        }

        return parent::createValue($model);
    }
protected function createValue($model)
    {
        if ($this->identifierAsIndex) {
            return (string) current($this->getIdentifierValues($model));
        }

        return parent::createValue($model);
    }
protected function createValue ( $ model ) { if ( $ this -> identifierAsIndex ) { return ( string ) current ( $ this -> getIdentifierValues ( $ model ) ) ; } return parent :: createValue ( $ model ) ; }
Creates a new unique value for this model.

If the model has a single-field identifier, this identifier is used.

Otherwise a new integer is generated.

@param mixed $model The choice to create a value for

@return int|string A unique value without character limitations.
Creates a new unique value for this model .