You are here

public function DataProviderNode::getQueryForList in RESTful 7.2

Overrides DataProviderEntity::getQueryForList().

Expose only published nodes.

Overrides DataProviderEntity::getQueryForList

File

src/Plugin/resource/DataProvider/DataProviderNode.php, line 22
Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderNode.

Class

DataProviderNode
Class DataProviderNode.

Namespace

Drupal\restful\Plugin\resource\DataProvider

Code

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