You are here

public function UserMatcher::getSummary in Linkit 8.4

Same name and namespace in other branches
  1. 8.5 src/Plugin/Linkit/Matcher/UserMatcher.php \Drupal\linkit\Plugin\Linkit\Matcher\UserMatcher::getSummary()

Returns the summarized configuration of the matcher.

Return value

array An array of summarized configuration of the matcher.

Overrides EntityMatcher::getSummary

File

src/Plugin/Linkit/Matcher/UserMatcher.php, line 25
Contains \Drupal\linkit\Plugin\Linkit\Matcher\UserMatcher.

Class

UserMatcher
Plugin annotation @Matcher( id = "entity:user", target_entity = "user", label = @Translation("User"), provider = "user" )

Namespace

Drupal\linkit\Plugin\Linkit\Matcher

Code

public function getSummary() {
  $summery = parent::getSummary();
  $roles = !empty($this->configuration['roles']) ? $this->configuration['roles'] : [
    'None',
  ];
  $summery[] = $this
    ->t('Role filter: @role_filter', [
    '@role_filter' => implode(', ', $roles),
  ]);
  $summery[] = $this
    ->t('Include blocked users: @include_blocked', [
    '@include_blocked' => $this->configuration['include_blocked'] ? $this
      ->t('Yes') : $this
      ->t('No'),
  ]);
  return $summery;
}