public function FilterInsertBlock::tips in Insert Block 8
Same name and namespace in other branches
- 8.x lib/Drupal/insert_block/Plugin/Filter/FilterInsertBlock.php \Drupal\insert_block\Plugin\Filter\FilterInsertBlock::tips()
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 FilterBase::tips
File
- lib/
Drupal/ insert_block/ Plugin/ Filter/ FilterInsertBlock.php, line 49
Class
- FilterInsertBlock
- Class FilterInsertBlock
Namespace
Drupal\insert_block\Plugin\FilterCode
public function tips($long = FALSE) {
if ($long) {
return t('<a name="filter-insert_block"></a>You may use [block:<em>block_entity_id</em>] tags to display the contents of block. To discover block entity id, visit admin/structure/block and hover over a block\'s configure link and look in your browser\'s status bar. The last "word" you see is the block ID.');
}
else {
return t('You may use <a href="@insert_block_help">[block:<em>block_entity_id</em>] tags</a> to display the contents of block.', array(
"@insert_block_help" => url("filter/tips/filter_insert_block", array(
'fragment' => 'filter-insert_block',
)),
));
}
}