Menu\Items\Item::__construct PHP Method

__construct() public method

Create a new item instance
public __construct ( ItemList $parent, Tag $value, array $children = null, array $element = null, string $beforeContent = null, string $afterContent = null )
$parent ItemList The parent
$value HtmlObject\Traits\Tag The content
$children array Facultative children ItemLists
$element array The Item element
$beforeContent string String to add before the content
$afterContent string String to add after the content
    public function __construct(ItemList $parent, Tag $value, $children = null, $element = null, $beforeContent = null, $afterContent = null)
    {
        $this->parent = $parent;
        $this->children = is_null($children) ? new ItemList() : $children;
        $this->element = $element;
        $this->beforeContent = $beforeContent;
        $this->afterContent = $afterContent;
        // Create content
        $this->value = $value->setParent($this);
    }