TbHtml::help PHP Method

help() public static method

Generates a help text.
public static help ( string $text, array $htmlOptions = [] ) : string
$text string the help text.
$htmlOptions array additional HTML attributes.
return string the generated text.
    public static function help($text, $htmlOptions = array())
    {
        $type = TbArray::popValue('type', $htmlOptions, self::HELP_TYPE_BLOCK);
        self::addCssClass('help-' . self::HELP_TYPE_BLOCK, $htmlOptions);
        return self::tag($type === self::HELP_TYPE_INLINE ? 'span' : 'p', $htmlOptions, $text);
    }

Usage Example

Exemplo n.º 1
0
 public function testHelp()
 {
     $I = $this->codeGuy;
     $html = TbHtml::help('Help text');
     $span = $I->createNode($html, 'span.help-inline');
     $I->seeNodeText($span, 'Help text');
 }
All Usage Examples Of TbHtml::help
TbHtml