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

inheritance class

Discussion in 'XenForo Development Discussions' started by Hugilore111, May 8, 2016.

  1. Hugilore111

    Hugilore111 Member

    Hello everybody
    I inherit a class, but when the transmission parameter from the parent to the child class is not transmitted properly.
    I should like to convey the image in the template account_personal_details
    but it is transferred to another template account_vrapper
    give me advice.

    class MyAddon_ControllerPublic_Account extends XFCP_MyAddon_ControllerPublic_Account
        public function actionPersonalDetails()
            $response = parent::actionPersonalDetails();
           $response->params['myArray'] = 'myArray';
            return $response;
  2. Liam W

    Liam W Well-Known Member

    You have to modify the subView. The account controllers use a wrapper, with the 'actual' view in the subView.



    class MyAddon_ControllerPublic_Account extends XFCP_MyAddon_ControllerPublic_Account
        public function 
    $response parent::actionPersonalDetails();

    $response->subView->params['myArray'] = 'myArray';

    Hugilore111 likes this.

Share This Page