You are here

public function BootstrapHelpShortcode::tips in Bootstrap 3 shortcodes 8

Generates a filter's tip.

A filter's tips should be informative and to the point. Short tips are preferably one-liners.

@todo Split into getSummaryItem() and buildGuidelines().

Parameters

bool $long: Whether this callback should return a short tip to display in a form (FALSE), or whether a more elaborate filter tips should be returned for template_preprocess_filter_tips() (TRUE).

Return value

string|null Translated text to display as a tip, or NULL if this filter has no tip.

Overrides ShortcodeBase::tips

File

src/Plugin/Shortcode/BootstrapHelpShortcode.php, line 30
Adds shortcodes for all Bootstrap elements.

Class

BootstrapHelpShortcode
Plugin annotation @Shortcode( id = "bs_help", token = "help", title = @Translation("Help"), description = @Translation("Bootstrap 3 shortcode"), weight = 50 )

Namespace

Drupal\bs_shortcodes\Plugin\Shortcode

Code

public function tips($long = FALSE) {
  $output = '<p>' . t('<strong>Bootstrap 3 shortcodes</strong> supports all bootstrap components, including responsive grids, buttons, tabs, accordeons, wells, dividers etc. Documentation:' . '</p>');
  $output .= '<div class="row"><div class="col-md-3">' . t('<a href="@docs" target="_blank">Shortcodes overview and examples</a>', array(
    '@docs' => 'https://github.com/filipstefansson/bootstrap-3-shortcodes#shortcode-reference',
  )) . '</div>';
  $output .= '<div class="row"><div class="col-md-3">' . t('<a href="@docs" target="_blank">Bootstrap CSS documentation</a>', array(
    '@docs' => 'http://getbootstrap.com/css/',
  )) . '</div>';
  $output .= '<div class="row"><div class="col-md-3">' . t('<a href="@docs" target="_blank">Bootstrap Components documentation</a>', array(
    '@docs' => 'http://getbootstrap.com/components/',
  )) . '</div>';
  $output .= '<div class="row"><div class="col-md-3">' . t('<a href="@docs" target="_blank">Bootstrap Javascript documentation</a>', array(
    '@docs' => 'http://getbootstrap.com/javascript/',
  )) . '</div></div>';
  $output .= '<p></p>';
  return $output;
}