abstract class MatchEngineBase in CRM Core 8.3
Same name and namespace in other branches
- 8 modules/crm_core_match/src/Plugin/crm_core_match/engine/MatchEngineBase.php \Drupal\crm_core_match\Plugin\crm_core_match\engine\MatchEngineBase
- 8.2 modules/crm_core_match/src/Plugin/crm_core_match/engine/MatchEngineBase.php \Drupal\crm_core_match\Plugin\crm_core_match\engine\MatchEngineBase
Default implementation of MatchEngineInterface.
Safe for use by most matching engines.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\crm_core_match\Plugin\crm_core_match\engine\MatchEngineBase implements ContainerFactoryPluginInterface, MatchEngineInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of MatchEngineBase
File
- modules/
crm_core_match/ src/ Plugin/ crm_core_match/ engine/ MatchEngineBase.php, line 16
Namespace
Drupal\crm_core_match\Plugin\crm_core_match\engineView source
abstract class MatchEngineBase extends PluginBase implements MatchEngineInterface, ContainerFactoryPluginInterface {
/**
* The engine configuration.
*
* @var array
*/
protected $configuration;
/**
* The plugin id.
*
* @var string
*/
protected $pluginId;
/**
* The plugin implementation definition.
*
* @var array
*/
protected $pluginDefinition;
/**
* Constructs an plugin instance.
*/
public function __construct($configuration, $plugin_id, $plugin_definition) {
$this->configuration = $configuration;
$this->pluginDefinition = $plugin_definition;
$this->pluginId = $plugin_id;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition);
}
/**
* {@inheritdoc}
*/
public function getConfiguration() {
return $this->configuration;
}
/**
* {@inheritdoc}
*/
public function setConfiguration(array $configuration) {
$this->configuration = $configuration;
}
/**
* {@inheritdoc}
*/
public function getConfigurationItem($key) {
$configuration = $this
->getConfiguration();
return NestedArray::getValue($configuration, (array) $key);
}
/**
* {@inheritdoc}
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
return $form;
}
/**
* {@inheritdoc}
*/
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
// Do nothing.
}
/**
* {@inheritdoc}
*/
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
// Do nothing.
}
/**
* {@inheritdoc}
*/
public function getRules() {
return [];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 19 |
MatchEngineBase:: |
protected | property |
The engine configuration. Overrides PluginBase:: |
|
MatchEngineBase:: |
protected | property |
The plugin implementation definition. Overrides PluginBase:: |
|
MatchEngineBase:: |
protected | property |
The plugin id. Overrides PluginBase:: |
|
MatchEngineBase:: |
public | function |
Form constructor. Overrides PluginFormInterface:: |
1 |
MatchEngineBase:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
1 |
MatchEngineBase:: |
public | function |
Gets this plugin's configuration. Overrides ConfigurableInterface:: |
|
MatchEngineBase:: |
public | function |
Returns a specific item of this plugin's configuration. Overrides MatchEngineInterface:: |
|
MatchEngineBase:: |
public | function |
Gets the rules that are matched. Overrides MatchEngineInterface:: |
1 |
MatchEngineBase:: |
public | function |
Sets the configuration for this plugin instance. Overrides ConfigurableInterface:: |
|
MatchEngineBase:: |
public | function |
Form submission handler. Overrides PluginFormInterface:: |
1 |
MatchEngineBase:: |
public | function |
Form validation handler. Overrides PluginFormInterface:: |
1 |
MatchEngineBase:: |
public | function |
Constructs an plugin instance. Overrides PluginBase:: |
1 |
MatchEngineInterface:: |
public | function | Finds matches for given contact. | 1 |
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
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:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
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. |