public static function FocalPointImageWidget::validatePreviewToken in Focal Point 8
Validate a preview token.
@codeCoverageIgnore
Parameters
string $token: A drupal generated token.
Return value
bool True if the token is valid.
1 call to FocalPointImageWidget::validatePreviewToken()
- FocalPointPreviewController::validTokenProvided in src/
Controller/ FocalPointPreviewController.php - Was a valid token found?
File
- src/
Plugin/ Field/ FieldWidget/ FocalPointImageWidget.php, line 245
Class
- FocalPointImageWidget
- Plugin implementation of the 'image_focal_point' widget.
Namespace
Drupal\focal_point\Plugin\Field\FieldWidgetCode
public static function validatePreviewToken($token) {
return \Drupal::csrfToken()
->validate($token, self::PREVIEW_TOKEN_NAME);
}