public function reviveRemoteEntry(Client $client): void
    {
        /** @var \Contentful\Delivery\Resource\Entry $remoteEntry */
        $remoteEntry = $client->parseJson($this->json);
        $this->id = $remoteEntry->getSpace()->getId() . '|' . $remoteEntry->getId();

        $contentType = $remoteEntry->getContentType();
        if ($contentType === null) {
            return;
        }

        $nameField = $contentType->getDisplayField();
        if ($nameField === null) {
            return;
        }

        /** @var callable $callable */
        $callable = [$remoteEntry, 'get' . $nameField->getId()];
        $this->name = call_user_func($callable);

        $this->remoteEntry = $remoteEntry;
    }
public function reviveRemoteEntry(Client $client): void
    {
        /** @var \Contentful\Delivery\Resource\Entry $remoteEntry */
        $remoteEntry = $client->parseJson($this->json);
        $this->id = $remoteEntry->getSpace()->getId() . '|' . $remoteEntry->getId();

        $contentType = $remoteEntry->getContentType();
        if ($contentType === null) {
            return;
        }

        $nameField = $contentType->getDisplayField();
        if ($nameField === null) {
            return;
        }

        /** @var callable $callable */
        $callable = [$remoteEntry, 'get' . $nameField->getId()];
        $this->name = call_user_func($callable);

        $this->remoteEntry = $remoteEntry;
    }
public function reviveRemoteEntry ( Client $ client ) : void { /** @var \Contentful\Delivery\Resource\Entry $remoteEntry */ $ remoteEntry = $ client -> parseJson ( $ this -> json ) ; $ this -> id = $ remoteEntry -> getSpace ( ) -> getId ( ) . '|' . $ remoteEntry -> getId ( ) ; $ contentType = $ remoteEntry -> getContentType ( ) ; if ( $ contentType === null ) { return ; } $ nameField = $ contentType -> getDisplayField ( ) ; if ( $ nameField === null ) { return ; } /** @var callable $callable */ $ callable = [ $ remoteEntry , 'get' . $ nameField -> getId ( ) ] ; $ this -> name = call_user_func ( $ callable ) ; $ this -> remoteEntry = $ remoteEntry ; }
Revives the remote entry from provided client.
Revives the remote entry from provided client .