Changed $this->session to $this->getSession().