You are here

public function DataProviderComment::getQueryForList in RESTful 7.2

Overrides DataProviderEntity::getQueryForList().

Expose only published comments.

Overrides DataProviderEntity::getQueryForList

File

modules/restful_example/src/Plugin/resource/comment/DataProviderComment.php, line 44
Contains \Drupal\restful_example\Plugin\resource\comment\DataProviderComment.

Class

DataProviderComment

Namespace

Drupal\restful_example\Plugin\resource\comment

Code

public function getQueryForList() {
  $query = parent::getQueryForList();
  $query
    ->propertyCondition('status', COMMENT_PUBLISHED);
  return $query;
}