Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple calls hook_restful_resource_alter #1028

Open
abratko opened this issue Jun 11, 2018 · 0 comments
Open

Multiple calls hook_restful_resource_alter #1028

abratko opened this issue Jun 11, 2018 · 0 comments

Comments

@abratko
Copy link

abratko commented Jun 11, 2018

All hooks hook_restful_resource_alter are called all time when resource getting from resource collection.

/restful/src/Resource/ResourcePluginCollection.php

public function &get($instance_id) {
      $resource = parent::get($instance_id);
      // Allow altering the resource, this way we can read the resource's
      // definition to return a different class that is using composition.
      drupal_alter('restful_resource', $resource);
      $resource = $resource->isEnabled() ? $resource : NULL;
}
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

No branches or pull requests

1 participant