You are here

public function DataProviderNode::getQueryCount in RESTful 7.2

Overrides DataProviderEntity::getQueryCount().

Only count published nodes.

Overrides DataProviderEntity::getQueryCount

File

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

Class

DataProviderNode
Class DataProviderNode.

Namespace

Drupal\restful\Plugin\resource\DataProvider

Code

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