TbHtml::fileFieldControlGroup PHP Method

fileFieldControlGroup() public static method

Generates a control group with a file field.
See also: self::controlGroup
public static fileFieldControlGroup ( string $name, string $value = '', array $htmlOptions = [] ) : string
$name string the input name.
$value string the input value.
$htmlOptions array additional HTML attributes.
return string the generated control group.
    public static function fileFieldControlGroup($name, $value = '', $htmlOptions = array())
    {
        return self::controlGroup(self::INPUT_TYPE_FILE, $name, $value, $htmlOptions);
    }

Usage Example

Example #1
0
 public function testFileFieldControlGroup()
 {
     $I = $this->codeGuy;
     $html = TbHtml::fileFieldControlGroup('file', 'file');
     $group = $I->createNode($html, 'div.control-group');
     $label = $group->filter('label.control-label');
     $I->seeNodeChildren($label, array('input[type=file]'));
 }
TbHtml