public function getNormalizedIdentifier($document)
    {
        if (is_scalar($document)) {
            throw new \InvalidArgumentException('Invalid argument, object or null required');
        }

        // the document is not managed
        if (!$document || !$this->getDocumentManager()->contains($document)) {
            return;
        }

        $values = $this->getIdentifierValues($document);

        return $values[0];
    }
public function getNormalizedIdentifier($document)
    {
        if (is_scalar($document)) {
            throw new \InvalidArgumentException('Invalid argument, object or null required');
        }

        // the document is not managed
        if (!$document || !$this->getDocumentManager()->contains($document)) {
            return;
        }

        $values = $this->getIdentifierValues($document);

        return $values[0];
    }
public function getNormalizedIdentifier ( $ document ) { if ( is_scalar ( $ document ) ) { throw new \ InvalidArgumentException ( 'Invalid argument, object or null required' ) ; } // the document is not managed if ( ! $ document || ! $ this -> getDocumentManager ( ) -> contains ( $ document ) ) { return ; } $ values = $ this -> getIdentifierValues ( $ document ) ; return $ values [ 0 ] ; }
This is just taking the id out of the array again.

{@inheritdoc}

@throws \InvalidArgumentException if $document is not an object or null
This is just taking the id out of the array again .