Parameters
$name - The element name.
$text - The element content text.
$textState - The current text state values.
$htmlAttribs - The element attributes.
$addIndent - _ParamSummary_
$childIndent - _ParamSummary_
$isEmpty - Indicates if an empty element.
$close - Indicates if the element will be closed.
Returns
The added HTML element.
Syntax
| PHP |
public function Create(string $name, LJCTextState $textState , string $text = "", LJCAttributes $attribs = null, bool $addIndent = true , bool $childIndent = true, bool $isEmpty = false, bool $close = true)
|
Appends an element.
Remarks
Create() is an "Append Element" method. It creates the element text with
GetCreate() and adds it to the builder.
The appended text does not end with a new line. This allows for additions
after the text.
The added text will start with a new line if the builder text already has
a value.
Example
| PHP |
$textState = new LJCTextState();
$tb = new LJCTextBuilder($textState);
// Example Method:
$tb->Create("p", $textState);
$result = $tb->ToString();
// result:
// <p></p>
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.