public function addCustomEvent($name, $code, $priority = 5, $inline = false) {
        $custom = new Custom();
        $custom->setName($name)
               ->setCode($code)
               ->setPriority($priority)
               ->setInline($inline);
        $this->builder->addEvent($custom);
        return $this;
    }