RESTful-Drupal / restful

RESTful best practices for Drupal
https://drupal.org/project/restful
419 stars 173 forks source link

Data provider: move to function apart isListRequest function #1002

Open omarlopesino opened 7 years ago

omarlopesino commented 7 years ago

Hi.

The changes from this PR are make a method in Drupal\restful\Plugin\resource\DataProvider class to check is a list request. In this way other class can extend and determine if this is a list request by themselves.

Use case: a resource wich is using path like this 'resource/%' with only one value, no commas, that returns a list of entities using a custom data provider. This is useful because the custom data provider can use the filters in his query for list.

Please review, thanks!

omarlopesino commented 7 years ago

There is a strange error in travis console The program 'drush' is currently not installed. To run 'drush' please ask your administrator to install the package 'drush', but the changes of PR shouldn't be the cause.

What can be happening?