You are here

public function ImageTagPlugin::getDefaultSample in Extensible BBCode 4.0.x

Same name and namespace in other branches
  1. 8.3 standard/src/Plugin/XBBCode/ImageTagPlugin.php \Drupal\xbbcode_standard\Plugin\XBBCode\ImageTagPlugin::getDefaultSample()

Throws

\InvalidArgumentException

Overrides TagPluginBase::getDefaultSample

File

standard/src/Plugin/XBBCode/ImageTagPlugin.php, line 28

Class

ImageTagPlugin
Inserts an image.

Namespace

Drupal\xbbcode_standard\Plugin\XBBCode

Code

public function getDefaultSample() : string {
  return $this
    ->t('[{{ name }} width=57 height=66]@url[/{{ name }}]', [
    '@url' => Url::fromUri('base:core/themes/bartik/logo.svg')
      ->toString(),
  ]);
}