Back to CMSApplication class

Method getFormToken

public string
getFormToken
(mixed $forceNew = false)
Method to determine a hash for anti-spoofing variable names
Parameters
  • bool $forceNew If true, force a new token to be created
Returns
  • string Hashed var name
Since
  • 4.0.0

Method getFormToken - Source code

/**
 * Method to determine a hash for anti-spoofing variable names
 *
 * @param   boolean  $forceNew  If true, force a new token to be created
 *
 * @return  string  Hashed var name
 *
 * @since   4.0.0
 */
public function getFormToken($forceNew = false)
{
    /** @var Session $session */
    $session = $this->getSession();
    return $session->getFormToken($forceNew);
}