public function FileMatcher::getSummary in Linkit 8.4
Same name and namespace in other branches
- 8.5 src/Plugin/Linkit/Matcher/FileMatcher.php \Drupal\linkit\Plugin\Linkit\Matcher\FileMatcher::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/ FileMatcher.php, line 27 - Contains \Drupal\linkit\Plugin\Linkit\Matcher\FileMatcher.
Class
- FileMatcher
- Plugin annotation @Matcher( id = "entity:file", target_entity = "file", label = @Translation("File"), provider = "file" )
Namespace
Drupal\linkit\Plugin\Linkit\MatcherCode
public function getSummary() {
$summery = parent::getSummary();
$summery[] = $this
->t('Show image dimensions: @show_image_dimensions', [
'@show_image_dimensions' => $this->configuration['images']['show_dimensions'] ? $this
->t('Yes') : $this
->t('No'),
]);
$summery[] = $this
->t('Show image thumbnail: @show_image_thumbnail', [
'@show_image_thumbnail' => $this->configuration['images']['show_thumbnail'] ? $this
->t('Yes') : $this
->t('No'),
]);
if ($this->moduleHandler
->moduleExists('image') && $this->configuration['images']['show_thumbnail']) {
$image_style = ImageStyle::load($this->configuration['images']['thumbnail_image_style']);
if (!is_null($image_style)) {
$summery[] = $this
->t('Thumbnail style: @thumbnail_style', [
'@thumbnail_style' => $image_style
->label(),
]);
}
}
return $summery;
}