Skip to content

[FEATURE] Allow RESTful module to support \EntityStructureWrapper types in the buildResourceMetadataItem function.#920

Open
m4olivei wants to merge 1 commit into
RESTful-Drupal:7.x-2.xfrom
m4olivei:919-support-EntityStructureWrapper
Open

[FEATURE] Allow RESTful module to support \EntityStructureWrapper types in the buildResourceMetadataItem function.#920
m4olivei wants to merge 1 commit into
RESTful-Drupal:7.x-2.xfrom
m4olivei:919-support-EntityStructureWrapper

Conversation

@m4olivei

@m4olivei m4olivei commented May 5, 2016

Copy link
Copy Markdown

Resolves #919.

I'm wondering if this needs to be careful about calling $this->getSubProperty()? For me it works b/c the field types that end up using this are always defined with a sub_property, eg.

$public_fields['show'] = array(
  'property' => 'field_tv_shows',
  'sub_property' => 'show',
  'resource' => array(
    'name' => 'shows',
    'majorVersion' => '1',
    'minorVersion' => '0',
  ),
);

…es in the buildResourceMetadataItem function.
@m4olivei

m4olivei commented May 5, 2016

Copy link
Copy Markdown
Author

In addition to the failing tests, I just noticed it fails with my setup as well. I believe it stems from the fact that EntityDrupalWrapper extends EntityStructureWrapper, so the if statement is catching too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant