Defines a join test plugin.
@Plugin(
id = "join_test",
title = @Translation("Join test")
)
Expanded class hierarchy of JoinTest
class JoinTest extends JoinPluginBase {
/**
* A value which is used to build an additional join condition.
*
* @var int
*/
protected $joinValue;
/**
* Returns the joinValue property.
*
* @return int
*/
public function getJoinValue() {
return $this->joinValue;
}
/**
* Sets the joinValue property.
*
* @param int $join_value
*/
public function setJoinValue($join_value) {
$this->joinValue = $join_value;
}
/**
* Overrides Drupal\views\Plugin\views\join\JoinPluginBase::buildJoin().
*/
public function buildJoin($select_query, $table, $view_query) {
// Add an additional hardcoded condition to the query.
$this->extra = 'node.uid = ' . $this
->getJoinValue();
parent::buildJoin($select_query, $table, $view_query);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
JoinPluginBase:: |
public | property | Defines whether a join has been adjusted. | |
JoinPluginBase:: |
public | property |
The configuration array passed by initJoin. Overrides PluginBase:: |
|
JoinPluginBase:: |
public | property | An array of extra conditions on the join. | |
JoinPluginBase:: |
public | property | How all the extras will be combined. Either AND or OR. | |
JoinPluginBase:: |
public | property | The field to join on (right field). | |
JoinPluginBase:: |
public | property | The field we join to. | |
JoinPluginBase:: |
public | property | The table we join to. | |
JoinPluginBase:: |
public | property | The table to join (right table). | |
JoinPluginBase:: |
public | property | The join type, so for example LEFT (default) or INNER. | |
JoinPluginBase:: |
public | function |
Constructs a Drupal\views\Plugin\views\join\JoinPluginBase object. Overrides PluginBase:: |
1 |
JoinTest:: |
protected | property | A value which is used to build an additional join condition. | |
JoinTest:: |
public | function |
Overrides Drupal\views\Plugin\views\join\JoinPluginBase::buildJoin(). Overrides JoinPluginBase:: |
|
JoinTest:: |
public | function | Returns the joinValue property. | |
JoinTest:: |
public | function | Sets the joinValue property. | |
PluginBase:: |
protected | property | The discovery object. | |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
public | function |
Implements Drupal\Component\Plugin\PluginInterface::getDefinition(). Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function |
Implements Drupal\Component\Plugin\PluginInterface::getPluginId(). Overrides PluginInspectionInterface:: |