You are here

public function UserRegistration::format in Open Social 10.2.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserRegistration.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserRegistration::format()
  2. 8.5 modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserRegistration.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserRegistration::format()
  3. 8.6 modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserRegistration.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserRegistration::format()
  4. 8.7 modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserRegistration.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserRegistration::format()
  5. 8.8 modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserRegistration.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserRegistration::format()
  6. 10.3.x modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserRegistration.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserRegistration::format()
  7. 10.0.x modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserRegistration.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserRegistration::format()
  8. 10.1.x modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserRegistration.php \Drupal\social_user_export\Plugin\UserExportPlugin\UserRegistration::format()

Formats a date, using a date type or a custom date format string.

Parameters

mixed $entity: The entity object.

Return value

string A translated date string in the requested format. Since the format may contain user input, this value should be escaped when output.

2 calls to UserRegistration::format()
EnrolmentUserRegistration::getValue in modules/social_features/social_event/modules/social_event_an_enroll_enrolments_export/src/Plugin/UserExportPlugin/EnrolmentUserRegistration.php
Returns the value.
UserRegistration::getValue in modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserRegistration.php
Returns the value.

File

modules/social_features/social_user_export/src/Plugin/UserExportPlugin/UserRegistration.php, line 43

Class

UserRegistration
Provides a 'UserRegistration' user export row.

Namespace

Drupal\social_user_export\Plugin\UserExportPlugin

Code

public function format($entity) {
  return $this->dateFormatter
    ->format($entity
    ->getCreatedTime(), 'short');
}