Bootstrapper\Form::help PHP Method

help() public method

Creates a help block
public help ( string $helpText, array $attributes = [] ) : string
$helpText string The help text
$attributes array
return string
    public function help($helpText, $attributes = [])
    {
        $attributes['class'] = isset($attributes['class']) ? 'help-block ' . $attributes['class'] : 'help-block';
        $attributes = new Attributes($attributes);
        return "<span {$attributes}>{$helpText}</span>";
    }

Usage Example

Example #1
0
 /**
  * Creates a help block
  *
  * @param string $helpText The help text
  * @param array $attributes
  * @return string 
  * @static 
  */
 public static function help($helpText, $attributes = array())
 {
     return \Bootstrapper\Form::help($helpText, $attributes);
 }