public static function PersianDateHelper::ampm in Persian Date for Drupal 8 8
Same name and namespace in other branches
- 8.4 src/PersianDateHelper.php \Drupal\persian_date\PersianDateHelper::ampm()
Constructs an array of AM and PM options.
Parameters
bool $required: (optional) If FALSE, the returned array will include a blank value. Defaults to FALSE.
Return value
array An array of AM and PM options.
Overrides DateHelper::ampm
File
- src/
PersianDateHelper.php, line 421
Class
Namespace
Drupal\persian_dateCode
public static function ampm($required = FALSE) {
$none = [
'' => '',
];
$ampm = [
'am' => t('am', [], [
'context' => 'ampm',
]),
'pm' => t('pm', [], [
'context' => 'ampm',
]),
];
return !$required ? $none + $ampm : $ampm;
}