class JoinTest in Zircon Profile 8
Same name in this branch
- 8 core/modules/views/src/Tests/Plugin/JoinTest.php \Drupal\views\Tests\Plugin\JoinTest
- 8 core/modules/views/tests/modules/views_test_data/src/Plugin/views/join/JoinTest.php \Drupal\views_test_data\Plugin\views\join\JoinTest
Same name and namespace in other branches
- 8.0 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.
Plugin annotation
@ViewsJoin("join_test");
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTrait
- class \Drupal\views\Plugin\views\join\JoinPluginBase implements JoinPluginInterface
- class \Drupal\views_test_data\Plugin\views\join\JoinTest
- class \Drupal\views\Plugin\views\join\JoinPluginBase implements JoinPluginInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTrait
Expanded class hierarchy of JoinTest
1 file declares its use of JoinTest
- JoinTest.php in core/
modules/ views/ src/ Tests/ Plugin/ JoinTest.php - Contains \Drupal\views\Tests\Plugin\JoinTest.
File
- core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ join/ JoinTest.php, line 17 - Contains \Drupal\views_test_data\Plugin\views\join\JoinTest.
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
*/
public function getJoinValue() {
return $this->joinValue;
}
/**
* Sets the joinValue property.
*
* @param int $join_value
*/
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
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 |
Builds the SQL for the join this object represents. Overrides JoinPluginBase:: |
|
JoinTest:: |
public | function | Returns the joinValue property. | |
JoinTest:: |
public | function | Sets the joinValue property. | |
PluginBase:: |
protected | property | The plugin implementation definition. | |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |