class JoinTest
Same name in this branch
- 11.x core/modules/views/tests/src/Kernel/Plugin/JoinTest.php \Drupal\Tests\views\Kernel\Plugin\JoinTest
Same name and namespace in other branches
- 9 core/modules/views/tests/src/Kernel/Plugin/JoinTest.php \Drupal\Tests\views\Kernel\Plugin\JoinTest
- 9 core/modules/views/tests/modules/views_test_data/src/Plugin/views/join/JoinTest.php \Drupal\views_test_data\Plugin\views\join\JoinTest
- 8.9.x core/modules/views/tests/src/Kernel/Plugin/JoinTest.php \Drupal\Tests\views\Kernel\Plugin\JoinTest
- 8.9.x core/modules/views/tests/modules/views_test_data/src/Plugin/views/join/JoinTest.php \Drupal\views_test_data\Plugin\views\join\JoinTest
- 10 core/modules/views/tests/src/Kernel/Plugin/JoinTest.php \Drupal\Tests\views\Kernel\Plugin\JoinTest
- 10 core/modules/views/tests/modules/views_test_data/src/Plugin/views/join/JoinTest.php \Drupal\views_test_data\Plugin\views\join\JoinTest
Defines a join test plugin.
Attributes
#[ViewsJoin("join_test")]
Hierarchy
- class \Drupal\Component\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
- class \Drupal\views\Plugin\views\join\JoinPluginBase extends \Drupal\views\Plugin\views\join\JoinPluginInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\views_test_data\Plugin\views\join\JoinTest implements \Drupal\views\Plugin\views\join\JoinPluginBase
- class \Drupal\views\Plugin\views\join\JoinPluginBase extends \Drupal\views\Plugin\views\join\JoinPluginInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of JoinTest
2 files declare their use of JoinTest
- EntityReverseJoinTest.php in core/
modules/ views/ tests/ src/ Kernel/ Plugin/ EntityReverseJoinTest.php - JoinTest.php in core/
modules/ views/ tests/ src/ Kernel/ Plugin/ JoinTest.php
File
-
core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ join/ JoinTest.php, line 13
Namespace
Drupal\views_test_data\Plugin\views\joinView source
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
* The value of the join.
*/
public function getJoinValue() {
return $this->joinValue;
}
/**
* Sets the joinValue property.
*
* @param int $join_value
* The value of the join.
*/
public function setJoinValue($join_value) {
$this->joinValue = $join_value;
}
/**
* {@inheritdoc}
*/
public function buildJoin($select_query, $table, $view_query) {
// Add an additional hardcoded condition to the query.
$this->extra = 'views_test_data.uid = ' . $this->getJoinValue();
parent::buildJoin($select_query, $table, $view_query);
}
}
Members
Title Sort descending | Deprecated | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|---|
DependencySerializationTrait::$_entityStorages | protected | property | An array of entity type IDs keyed by the property name of their storages. | |||
DependencySerializationTrait::$_serviceIds | protected | property | An array of service IDs keyed by property name used for serialization. | |||
DependencySerializationTrait::__sleep | public | function | 1 | |||
DependencySerializationTrait::__wakeup | public | function | 2 | |||
JoinPluginBase::$adjusted | public | property | Defines whether a join has been adjusted. | |||
JoinPluginBase::$configuration | public | property | The configuration array passed by initJoin. | Overrides PluginBase::$configuration | ||
JoinPluginBase::$extra | public | property | An array of extra conditions on the join. | |||
JoinPluginBase::$extraOperator | public | property | How all the extras will be combined. Either AND or OR. | |||
JoinPluginBase::$field | public | property | The field to join on (right field). | |||
JoinPluginBase::$leftField | public | property | The field we join to. | |||
JoinPluginBase::$leftFormula | public | property | A formula to be used instead of the left field. | |||
JoinPluginBase::$leftTable | public | property | The table we join to. | |||
JoinPluginBase::$table | public | property | The table to join (right table). | |||
JoinPluginBase::$type | public | property | The join type, so for example LEFT (default) or INNER. | |||
JoinPluginBase::buildExtra | protected | function | Builds a single extra condition. | |||
JoinPluginBase::joinAddExtra | protected | function | Adds the extras to the join condition. | 1 | ||
JoinPluginBase::__construct | public | function | Constructs a Drupal\views\Plugin\views\join\JoinPluginBase object. | Overrides PluginBase::__construct | 1 | |
JoinTest::$joinValue | protected | property | A value which is used to build an additional join condition. | |||
JoinTest::buildJoin | public | function | Builds the SQL for the join this object represents. | Overrides JoinPluginBase::buildJoin | ||
JoinTest::getJoinValue | public | function | Returns the joinValue property. | |||
JoinTest::setJoinValue | public | function | Sets the joinValue property. | |||
MessengerTrait::$messenger | protected | property | The messenger. | 16 | ||
MessengerTrait::messenger | public | function | Gets the messenger. | 16 | ||
MessengerTrait::setMessenger | public | function | Sets the messenger. | |||
PluginBase::$pluginDefinition | protected | property | The plugin implementation definition. | |||
PluginBase::$pluginId | protected | property | The plugin ID. | |||
PluginBase::DERIVATIVE_SEPARATOR | constant | A string which is used to separate base plugin IDs from the derivative ID. | ||||
PluginBase::getBaseId | public | function | Overrides DerivativeInspectionInterface::getBaseId | |||
PluginBase::getDerivativeId | public | function | Overrides DerivativeInspectionInterface::getDerivativeId | |||
PluginBase::getPluginDefinition | public | function | Overrides PluginInspectionInterface::getPluginDefinition | |||
PluginBase::getPluginId | public | function | Overrides PluginInspectionInterface::getPluginId | |||
PluginBase::isConfigurable | Deprecated | public | function | Determines if the plugin is configurable. | ||
StringTranslationTrait::$stringTranslation | protected | property | The string translation service. | 3 | ||
StringTranslationTrait::formatPlural | protected | function | Formats a string containing a count of items. | |||
StringTranslationTrait::getNumberOfPlurals | protected | function | Returns the number of plurals supported by a given language. | |||
StringTranslationTrait::getStringTranslation | protected | function | Gets the string translation service. | |||
StringTranslationTrait::setStringTranslation | public | function | Sets the string translation service to use. | 2 | ||
StringTranslationTrait::t | protected | function | Translates a string to the current language or to a given language. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.