inheritance class

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.

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

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

       
        return $response;
       
}
}

wrapper.webp
 
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
 
Top Bottom