public function Profile::addMatcher in Linkit 8.4
Same name and namespace in other branches
- 8.5 src/Entity/Profile.php \Drupal\linkit\Entity\Profile::addMatcher()
Adds a matcher to this profile.
Parameters
array $configuration: An array of matcher configuration.
Return value
string The instance ID of the matcher.
Overrides ProfileInterface::addMatcher
File
- src/
Entity/ Profile.php, line 198 - Contains \Drupal\linkit\Entity\Profile.
Class
- Profile
- Defines the linkit profile entity.
Namespace
Drupal\linkit\EntityCode
public function addMatcher(array $configuration) {
$configuration['uuid'] = $this
->uuidGenerator()
->generate();
$this
->getMatchers()
->addInstanceId($configuration['uuid'], $configuration);
return $configuration['uuid'];
}