You are here

public function ConfigureActivityForm::callbackOptions in Activity 8

Callback for buildOptions function.

File

src/Form/ConfigureActivityForm.php, line 305

Class

ConfigureActivityForm
Configure activities form.

Namespace

Drupal\activity\Form

Code

public function callbackOptions($value, $langcode, $granularity = 2) {
  return \Drupal::service('date.formatter')
    ->formatInterval($value, $granularity, $langcode);
}