You are here

interface MatchEngineInterface in CRM Core 8.2

Same name and namespace in other branches
  1. 8.3 modules/crm_core_match/src/Plugin/crm_core_match/engine/MatchEngineInterface.php \Drupal\crm_core_match\Plugin\crm_core_match\engine\MatchEngineInterface
  2. 8 modules/crm_core_match/src/Plugin/crm_core_match/engine/MatchEngineInterface.php \Drupal\crm_core_match\Plugin\crm_core_match\engine\MatchEngineInterface

Interface for matching engines.

CRM Core matching engines can implement this interface.

Hierarchy

Expanded class hierarchy of MatchEngineInterface

All classes that implement MatchEngineInterface

1 string reference to 'MatchEngineInterface'
crm_core_match.services.yml in modules/crm_core_match/crm_core_match.services.yml
modules/crm_core_match/crm_core_match.services.yml

File

modules/crm_core_match/src/Plugin/crm_core_match/engine/MatchEngineInterface.php, line 20
Contains \Drupal\crm_core_match\Plugin\crm_core_match\engine\MatchEngineInterface.

Namespace

Drupal\crm_core_match\Plugin\crm_core_match\engine
View source
interface MatchEngineInterface extends PluginInspectionInterface, PluginFormInterface, ConfigurablePluginInterface {

  /**
   * Finds matches for given contact.
   *
   * @param \Drupal\crm_core_contact\ContactInterface $contact
   *   A contact entity used to pass data for identifying a match.
   *
   * @return int[]
   *   An array of entity ids for potential matches.
   */
  public function match(ContactInterface $contact);

  /**
   * Returns a specific item of this plugin's configuration.
   *
   * @param string|array $key
   *   The key of the item to get, or an array of nested keys.
   *
   * @return mixed
   *   An item of this plugin's configuration.
   */
  public function getConfigurationItem($key);

  /**
   * Gets the rules that are matched.
   *
   * By default those are the contact type fields.
   *
   * @todo Extend with typed data definition to limit selections.
   *
   * Example data:
   * @code
   * (
   *   field_name => array(
   *     label,
   *     definition,
   * ),
   * @endcode
   *
   * @return mixed
   */
  public function getRules();

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurablePluginInterface::defaultConfiguration public function Gets default configuration for this plugin. 1
ConfigurablePluginInterface::getConfiguration public function Gets this plugin's configuration. 1
ConfigurablePluginInterface::setConfiguration public function Sets the configuration for this plugin instance. 1
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
MatchEngineInterface::getConfigurationItem public function Returns a specific item of this plugin's configuration. 1
MatchEngineInterface::getRules public function Gets the rules that are matched. 1
MatchEngineInterface::match public function Finds matches for given contact. 1
PluginFormInterface::buildConfigurationForm public function Form constructor. 36
PluginFormInterface::submitConfigurationForm public function Form submission handler. 32
PluginFormInterface::validateConfigurationForm public function Form validation handler. 18
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2