How to extend conversationControls

  1. 5 years ago

    @Toby I am trying to find a way for over a week now to extend the conversationControls to add a menu item from within a plugin. I cannot find out how to get this done. I am desperately asking for guidance. Could you please find 5 minutes and help me on my way?

    See core/controllers/ETConversationController.class.php line 300:

    $this->trigger("conversationIndexDefault", array(&$conversation, &$controls, &$replyForm, &$replyControls));

    Listen to that event in your plugin and add stuff to the $controls object. e.g.

    public function handler_conversationController_conversationIndexDefault($sender, $conversation, $controls, $replyForm, $replyControls)
    {
        $controls->add("test", "<a href='#'>Test</a>");
    }
  2. Toby

    16 Apr 2014 Administrator Answer

    See core/controllers/ETConversationController.class.php line 300:

    $this->trigger("conversationIndexDefault", array(&$conversation, &$controls, &$replyForm, &$replyControls));

    Listen to that event in your plugin and add stuff to the $controls object. e.g.

    public function handler_conversationController_conversationIndexDefault($sender, $conversation, $controls, $replyForm, $replyControls)
    {
        $controls->add("test", "<a href='#'>Test</a>");
    }
  3. Hero!

 

or Sign Up to reply!