Getting current action from view component in symfony

 

$action =
  $this->getContext()->getActionStack()
  ->getLastEntry()->getActionInstance();
$action->redirect(''); // etc