smallAbbr() public static method

Generates a small abbreviation with a help text.
public static smallAbbr ( string $text, string $word, array $htmlOptions = [] ) : string
$text string the abbreviation.
$word string the word the abbreviation is for.
$htmlOptions array additional HTML attributes.
return string the generated abbreviation.
示例#1
0
    <h2>Abbrivations</h2>

    <div class="bs-docs-example">
        An abbreviation of the word attribute is <?php 
echo TbHtml::abbr('attr', 'attribute');
?>
.
    </div>
    <pre class="prettyprint linenums">
An abbreviation of the word attribute is &lt;?php echo TbHtml::abbr('attr', 'attribute'); ?>.</pre>

    <h3>Small</h3>

    <div class="bs-docs-example">
        <?php 
echo TbHtml::smallAbbr('HTML', 'HyperText Markup Language');
?>
 is the best thing since sliced bread.
    </div>
    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::smallAbbr('HTML', 'HyperText Markup Language'); ?> is the best thing since sliced bread.</pre>

    <hr class="bs-docs-separator">

    <h2>Blockquotes</h2>

    <h3>Default blockquote</h3>

    <div class="bs-docs-example">
        <?php 
echo TbHtml::quote('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.');
示例#2
0
 public function testSmallAbbreviation()
 {
     $I = $this->codeGuy;
     $html = TbHtml::smallAbbr('Abbreviation', 'Word');
     $abbr = $I->createNode($html, 'abbr');
     $I->seeNodeAttribute($abbr, 'title', 'Word');
     $I->seeNodeCssClass($abbr, 'initialism');
     $I->seeNodeText($abbr, 'Abbreviation');
 }