You are here

public function TableTagPlugin::getDefaultSample in Extensible BBCode 8.3

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

Return the unprocessed sample code.

This should have {{ name }} placeholders for the tag name.

Return value

string The sample code.

Overrides TagPluginBase::getDefaultSample

File

standard/src/Plugin/XBBCode/TableTagPlugin.php, line 87

Class

TableTagPlugin
Renders a table.

Namespace

Drupal\xbbcode_standard\Plugin\XBBCode

Code

public function getDefaultSample() : string {

  // Generate the sample here, as annotations don't do well with linebreaks.
  return $this
    ->t('[{{ name }} caption=Title header=!Item,Color,#Amount]
Fish,Red,1
Fish,Blue,2
[/{{ name }}]
[{{ name }}=~Left,Auto,!Center,#Right]
One,Two,Three,"Four, Five"
1,2,3,4
[/{{ name }}]
');
}