You are here

function LinkitPluginNode::getQueryInstance in Linkit 7.2

Start a new EntityFieldQuery instance.

Overrides LinkitPluginEntity::getQueryInstance

File

plugins/linkit_plugins/linkit-plugin-node.class.php, line 30
Define Linkit node plugin class.

Class

LinkitPluginNode
@file Define Linkit node plugin class.

Code

function getQueryInstance() {

  // Call the parent getQueryInstance method.
  parent::getQueryInstance();

  // If we don't want to include unpublished nodes, add a condition on status.
  if ($this->conf['include_unpublished'] == 0) {
    $this->query
      ->propertyCondition('status', NODE_PUBLISHED);
  }
}