Skip to content
Snippets Groups Projects
Commit b05c1be9 authored by Jeffrey Fortune's avatar Jeffrey Fortune
Browse files

changed t() to ->t() when used in non static methods

parent dee8c043
No related branches found
No related tags found
No related merge requests found
......@@ -140,10 +140,11 @@ class BgImgFieldFormatter extends ResponsiveImageFormatter implements ContainerF
$responsive_image_style = $this->responsiveImageStyleStorage->load($this->getSetting('responsive_image_style'));
if ($responsive_image_style) {
$summary[] = t('Responsive image style: @responsive_image_style', ['@responsive_image_style' => $responsive_image_style->label()]);
$summary[] = $this->t('Responsive image style: @responsive_image_style',
['@responsive_image_style' => $responsive_image_style->label()]);
}
else {
$summary[] = t('Select a responsive image style.');
$summary[] = $this->t('Select a responsive image style.');
}
return $summary;
......
......@@ -139,8 +139,8 @@ class BgImgItem extends ImageItem {
$elements['css_settings'] = [
'#type' => 'details',
'#title' => t('CSS Settings'),
'#description' => t('Set default CSS properties for the background image.'),
'#title' => $this->t('CSS Settings'),
'#description' => $this->t('Set default CSS properties for the background image.'),
'#open' => FALSE,
];
......@@ -153,8 +153,8 @@ class BgImgItem extends ImageItem {
// The css selector input field needed to.
$elements['css_settings']['css_selector'] = [
'#type' => 'textfield',
'#title' => t('Selector'),
'#description' => t('CSS Selector for background image.'),
'#title' => $this->t('Selector'),
'#description' => $this->t('CSS Selector for background image.'),
'#default_value' => $css_option_settings['css_selector'],
'#token_types' => $token_types,
'#element_validate' => 'token_element_validate',
......@@ -171,55 +171,56 @@ class BgImgItem extends ImageItem {
// User ability to select a background repeat option.
$elements['css_settings']['css_repeat'] = [
'#type' => 'radios',
'#title' => t('Repeat Options'),
'#description' => t('Add the css no repeat value to the background image.'),
'#title' => $this->t('Repeat Options'),
'#description' => $this->t('Add the css no repeat value to the background image.'),
'#default_value' => $css_option_settings['css_repeat'],
'#options' => [
"inherit" => t("inherit"),
"no-repeat" => t("no-repeat"),
"repeat" => t('repeat'),
"inherit" => $this->t("inherit"),
"no-repeat" => $this->t("no-repeat"),
"repeat" => $this->t('repeat'),
],
];
// User the ability to choose background size.
$elements['css_settings']['css_background_size'] = [
'#type' => 'radios',
'#title' => t('Background Size'),
'#description' => t("Add the background size setting you would like for the image, use inherit for default."),
'#title' => $this->t('Background Size'),
'#description' => $this->t("Add the background size setting you would like for the image, use inherit for default."),
'#default_value' => $css_option_settings['css_background_size'],
'#options' => [
'inherit' => t('inherit'),
'auto' => t('auto'),
'cover' => t('cover'),
'contain' => t('contain'),
'initial' => t('initial'),
'inherit' => $this->t('inherit'),
'auto' => $this->t('auto'),
'cover' => $this->t('cover'),
'contain' => $this->t('contain'),
'initial' => $this->t('initial'),
],
];
// User the ability to set the background position.
$elements['css_settings']['css_background_position'] = [
'#type' => 'radios',
'#title' => t('Background Position'),
'#description' => t('Set a background position, leave unchecked to have your own in your theme css.'),
'#title' => $this->t('Background Position'),
'#description' => $this->t('Set a background position, leave unchecked to
# have your own in your theme css.'),
'#default_value' => $css_option_settings['css_background_position'],
'#options' => [
"inherit" => t("inherit"),
"left top" => t("left top"),
"left center" => t("left center"),
"left bottom" => t("left bottom"),
"right top" => t("right bottom"),
"right center" => t("right center"),
"right bottom" => t("right bottom"),
"center top" => t("center top"),
"center center" => t("center center"),
"center bottom" => t("center bottom"),
"inherit" => $this->t("inherit"),
"left top" => $this->t("left top"),
"left center" => $this->t("left center"),
"left bottom" => $this->t("left bottom"),
"right top" => $this->t("right bottom"),
"right center" => $this->t("right center"),
"right bottom" => $this->t("right bottom"),
"center top" => $this->t("center top"),
"center center" => $this->t("center center"),
"center bottom" => $this->t("center bottom"),
],
'#tree' => TRUE,
];
$elements['file_settings'] = [
'#type' => 'details',
'#title' => t("File Settings"),
'#title' => $this->t("File Settings"),
'#open' => FALSE,
] + $parentElements;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment