You are here

public function Profile::removeMatcher in Linkit 8.4

Same name and namespace in other branches
  1. 8.5 src/Entity/Profile.php \Drupal\linkit\Entity\Profile::removeMatcher()

Removes a matcher from this profile.

Parameters

\Drupal\linkit\MatcherInterface $matcher: The matcher object.

Return value

$this

Overrides ProfileInterface::removeMatcher

File

src/Entity/Profile.php, line 207
Contains \Drupal\linkit\Entity\Profile.

Class

Profile
Defines the linkit profile entity.

Namespace

Drupal\linkit\Entity

Code

public function removeMatcher(MatcherInterface $matcher) {
  $this
    ->getMatchers()
    ->removeInstanceId($matcher
    ->getUuid());
  $this
    ->save();
  return $this;
}