/** * Retrieve Session Form Key * * @return string A 16 bit unique key for forms */ public function getFormKey() { if (!$this->isPresent()) { $this->set($this->mathRandom->getRandomString(16)); } return $this->escaper->escapeHtmlAttr($this->session->getData(self::FORM_KEY)); }