1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need to change the output of two actions

Discussion in 'XenForo Development Discussions' started by Mr. Goodie2Shoes, Dec 1, 2012.

  1. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    To make it clear, there are two actions I need to modify that are on two different controller classes...
    So how should I do it? Is there any way to use a listener instead of extending the classes?
    And yes, I cannot use pre_dispatch as this needs to be done AFTER the action is executed.

    Thanks!
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    I know how that works... I am not new you know :p
    just thinking if there's any other way to do it... since the output of both actions will be the same if a certain criteria meets I thought it would be better to reduce the size as much as possible...
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You would have to extend both controllers. Two extended classes. I know of no way to combine the two or otherwise consolidate.
     
    Mr. Goodie2Shoes likes this.
  5. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    hmm... then I got no other choice...
     

Share This Page