src/Element/MenuItem.php
public function init()
    {
        if ($this->type == 'separator') {
            return $this->parent->getRaw()->AppendSeparator();
        }

        $id = $this->collection->getTrueId($this->id);

        $title = "&{$this->title}";

        if ($this->shortcut) $title .= "\t{$this->shortcut}";

        $this->element = new wxMenuItem($this->parent->getRaw(), wxID_ANY, $title, $this->description, wxITEM_NORMAL);

        $this->bindEvents();
        
        $this->parent->getRaw()->Append($this->element);
    }
public function init()
    {
        if ($this->type == 'separator') {
            return $this->parent->getRaw()->AppendSeparator();
        }

        $id = $this->collection->getTrueId($this->id);

        $title = "&{$this->title}";

        if ($this->shortcut) $title .= "\t{$this->shortcut}";

        $this->element = new wxMenuItem($this->parent->getRaw(), wxID_ANY, $title, $this->description, wxITEM_NORMAL);

        $this->bindEvents();
        
        $this->parent->getRaw()->Append($this->element);
    }
Initialise the object

@return void