/**
* Displays a hidden token field to reduce the risk of CSRF exploits
*
* Use in conjunction with Session::checkToken()
*
* @param array $attribs Input element attributes.
*
* @return string A hidden input field with a token
*
* @see Session::checkToken()
* @since 1.5
*/
public static function token(array $attribs = array())
{
$attributes = '';
if ($attribs !== array()) {
$attributes .= ' ' . ArrayHelper::toString($attribs);
}
return '<input type="hidden" name="' . Session::getFormToken() . '" value="1"' . $attributes . '>';
}