function CommentNameConstraintValidator::getAnonymousContactDetailsSetting
Gets the anonymous contact details setting from the comment.
Parameters
\Drupal\comment\CommentInterface $comment: The entity.
Return value
int The anonymous contact setting.
1 call to CommentNameConstraintValidator::getAnonymousContactDetailsSetting()
- CommentNameConstraintValidator::validate in core/
modules/ comment/ src/ Plugin/ Validation/ Constraint/ CommentNameConstraintValidator.php  
File
- 
              core/
modules/ comment/ src/ Plugin/ Validation/ Constraint/ CommentNameConstraintValidator.php, line 88  
Class
- CommentNameConstraintValidator
 - Validates the CommentName constraint.
 
Namespace
Drupal\comment\Plugin\Validation\ConstraintCode
protected function getAnonymousContactDetailsSetting(CommentInterface $comment) {
  return $comment->getCommentedEntity()
    ->get($comment->getFieldName())
    ->getFieldDefinition()
    ->getSetting('anonymous');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.