Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Plugin/resource/DataProvider/DataProviderNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,24 @@ class DataProviderNode extends DataProviderEntity implements DataProviderInterfa
/**
* Overrides DataProviderEntity::getQueryForList().
*
* Expose only published nodes.
* Expose only published nodes, and of the current language.
*/
public function getQueryForList() {
$query = parent::getQueryForList();
$query->propertyCondition('status', NODE_PUBLISHED);
$query->propertyCondition('language', $this->getLangCode());
return $query;
}

/**
* Overrides DataProviderEntity::getQueryCount().
*
* Only count published nodes.
* Only count published nodes, and of the current language.
*/
public function getQueryCount() {
$query = parent::getQueryCount();
$query->propertyCondition('status', NODE_PUBLISHED);
$query->propertyCondition('language', $this->getLangCode());
return $query;
}

Expand Down