This module provides integration between Relation module and Services module.
After enabling it you will be able enable relation data as resources in services endpoints.
One additional use case is to deploy relations between sites with Deployment module.

Project link: https://drupal.org/sandbox/rosk0/2141983
Git: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/RoSk0/2141983.git relation_services

Reviews of other projects:
https://drupal.org/comment/8226149#comment-8226149
https://drupal.org/comment/8226503#comment-8226503
https://drupal.org/comment/8226549#comment-8226549
https://drupal.org/comment/8226623#comment-8226623

Comments

andypost’s picture

neerajskydiver’s picture

Can you fix warnings from parewiew.sh

Remove "project" from the ./relation_services.info file, it will be added by drupal.org packaging automatically.
./relation_services.module: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming

function relation_endpoint_field_entity_dependencies($entity_type, $entity, $field, $instance, $langcode, $endpoints) {
./relation_resource.inc: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming

function _relation_resource_create($relation_data) {
function _relation_resource_update($rid, $relation) {
function _relation_resource_index($page, $page_size) {
Coder Sniffer has found some issues with your code (please check the Drupal coding standards).

FILE: /var/www/drupal-7-pareview/pareview_temp/README.txt
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 2 WARNING(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
2 | WARNING | Line exceeds 80 characters; contains 91 characters
3 | WARNING | Line exceeds 80 characters; contains 84 characters
--------------------------------------------------------------------------------
rosk0’s picture

All warnings fixed, except one about function relation_endpoint_field_entity_dependencies(). This is implementation of hook_field_entity_dependencies for relation_endpoint module, which is submodule and requirement of relation module. I can't rename it and moving it to separate module looks foolish for me.

rosk0’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus

Added links to reviewed project applications.

andypost’s picture

Not sure I get #3:
Module name is relation_services
Implements hook_entity_dependencies(). means that function should be named: relation_services_entity_dependencies() not relation_endpoint_field_entity_dependencies)_

rosk0’s picture

@andypost: Module relation_services implements hook_field_entity_dependencies(not hook_entity_dependencies) for relation_endpoint field. This hook is triggered only for module that created this field, which is relation_endpoint. Better now?

andypost’s picture

In this case you have to use hook_module_implements_alter() to inject own implementation because your module could have collision with relation_endpoint if that one will implement this.
Also doc-block should be fixed to right hook name

andypost’s picture

But the better way is to file issue to relation_endpoint module queue to implement the hook where it belongs

rosk0’s picture

Agree.
Filed an issue #2146929: Add implementation of hook_field_entity_dependencies() to relation module and removed this hook implementation from my module.

th_tushar’s picture

Except the renaming of function "relation_endpoint_field_entity_dependencies", everything looks fine.

klausi’s picture

Assigned: Unassigned » chx
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

Thank you for your reviews. When finishing your review comment also set the issue status either to "needs work" (you found some problems with the project) or "reviewed & tested by the community" (you found no major flaws).

manual review:

  • Module looks a bit short to grant you the git vetted user role, but looking at your other patches I think you know what you are doing and we can proceed.

Looks good to me otherwise! Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

Assigning to chx as he might have time to take a final look at this.

klausi’s picture

Assigned: chx » Unassigned
Status: Reviewed & tested by the community » Fixed

no objections for more than a week, so ...

Thanks for your contribution, RoSk0!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

rosk0’s picture

Thanks, Klaus!
This the best gift fir my upcoming birthday!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.