You are here

public function WebformSubmission::getRemoteAddr in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Entity/WebformSubmission.php \Drupal\webform\Entity\WebformSubmission::getRemoteAddr()

Gets the remote IP address of the submission.

Return value

string The remote IP address of the submission

Overrides WebformSubmissionInterface::getRemoteAddr

File

src/Entity/WebformSubmission.php, line 360

Class

WebformSubmission
Defines the WebformSubmission entity.

Namespace

Drupal\webform\Entity

Code

public function getRemoteAddr() {
  return $this
    ->get('remote_addr')->value ?: $this
    ->t('(unknown)');
}