Nvd\Crud\Html::startTag PHP Method

startTag() public static method

public static startTag ( $tag, $attributes = [], $inline = false )
    public static function startTag($tag, $attributes = [], $inline = false)
    {
        $output = "<{$tag}";
        foreach ($attributes as $attr => $value) {
            $output .= " {$attr}='{$value}'";
        }
        $output .= $inline ? "/" : "";
        $output .= ">";
        return $output;
    }

Usage Example

コード例 #1
0
 protected function showTextarea()
 {
     $output = Html::startTag("textarea", $this->attributes);
     $output .= $this->value;
     $output .= Html::endTag("textarea");
     return $output;
 }