public function labelledByCallback(callable $labelCallback)
    {
        $this->updateOptions(function (ObjectIdentityOptions $options) use ($labelCallback) {
            return $options->withLabelCallback($labelCallback);
        });

        return $this;
    }
public function labelledByCallback(callable $labelCallback)
    {
        $this->updateOptions(function (ObjectIdentityOptions $options) use ($labelCallback) {
            return $options->withLabelCallback($labelCallback);
        });

        return $this;
    }
public function labelledByCallback ( callable $ labelCallback ) { $ this -> updateOptions ( function ( ObjectIdentityOptions $ options ) use ( $ labelCallback ) { return $ options -> withLabelCallback ( $ labelCallback ) ; } ) ; return $ this ; }
Labels the object options with the returned values of the supplied callback.

Example:
<code>
->labelledByCallback(function (SomeObject $object) : string {
return $object->string;
})
</code>

@param callable $labelCallback

@return static
Labels the object options with the returned values of the supplied callback .