abdfahim
Well-known member
While extending member controller, I need to add "use XF\Mvc\ParameterBag" line, otherwise it throws an error
However, while extending Account, the following code works without adding "use XF\Mvc\FormAction", though I use FormAction inside a function
Anyone please explain?
PHP:
use XF\Mvc\ParameterBag;
class Member extends XFCP_Member
{
public function actionNewTab(ParameterBag $params)
{
$user = $this->assertViewableUser($params->user_id);
$viewParams = [
'user' => $user
];
return $this->view('XF:Member\Timeline', 'abdfahim_newtab', $viewParams);
}
}
However, while extending Account, the following code works without adding "use XF\Mvc\FormAction", though I use FormAction inside a function
PHP:
class Account extends XFCP_Account
{
protected function newTestSaveProcess(\XF\Entity\User $visitor)
{
$form = $this->formAction();
...................
...................
return $form;
}
}
Anyone please explain?