I try to understand the parent thing; here I am now:
A method defines something like in entities:
This is like: Hey give me the basket with the fruits, I put an apple inside and give the basket back.
Then I found methods called with a value
I have not tested it yet, but I imagine that the original class runs until the return?
Then we fetch the $params, do something and give it back?
Then we use the return in the original class?
When I print_r such a var; i get one million values;
but I only want to extend the $viewParams before they are returned to the template
A method defines something like in entities:
Code:
public static function getStructure(Structure $structure)
{
$structure = parent::getStructure($structure);
add something to $structure
return $structure;
}
This is like: Hey give me the basket with the fruits, I put an apple inside and give the basket back.
Then I found methods called with a value
Code:
public function actionIndex(ParameterBag $params)
{
$view = parent::actionIndex($params);
do something
return $view;
{
I have not tested it yet, but I imagine that the original class runs until the return?
Then we fetch the $params, do something and give it back?
Then we use the return in the original class?
When I print_r such a var; i get one million values;
but I only want to extend the $viewParams before they are returned to the template