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

inheritance class

#1
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.

Code:
<?php
class MyAddon_ControllerPublic_Account extends XFCP_MyAddon_ControllerPublic_Account
{
    public function actionPersonalDetails()
    {
       
        $response = parent::actionPersonalDetails();

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

       
        return $response;
       
}
}
wrapper.jpg
 

Liam W

Well-known member
#2
You have to modify the subView. The account controllers use a wrapper, with the 'actual' view in the subView.

Use:

PHP:
<?php

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

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

      
        return $response;
       }
}
Liam