class MetatagViewsController extends ControllerBase {
/**
+ * The Views storage interface.
+ *
* @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $viewStorage;
/**
+ * The Metatag manager interface.
+ *
* @var \Drupal\metatag\MetatagManagerInterface
*/
protected $metatagManager;
* Generates the renderable array for views meta tags UI.
*
* @return array
- * Thelist of details.
+ * The list of details.
*/
public function listViews() {
$elements = [];
$elements['header'] = [
- '#markup' => '<p>' . t("To view a list of displays with meta tags set up, click on a view name. To view a summary of meta tags configuration for a particular display, click on the display name. If you need to set meta tags for a specific view, choose Add views meta tags. Reverting the meta tags removes the specific configuration and falls back to defaults.") . '</p>',
+ '#markup' => '<p>' . $this->t("To view a list of displays with meta tags set up, click on a view name. To view a summary of meta tags configuration for a particular display, click on the display name. If you need to set meta tags for a specific view, choose Add views meta tags. Reverting the meta tags removes the specific configuration and falls back to defaults.") . '</p>',
];
// Iterate over the values and build the whole UI.
'#type' => 'operations',
'#links' => [
'edit' => [
- 'title' => t('Edit'),
+ 'title' => $this->t('Edit'),
'url' => Url::fromRoute('metatag_views.metatags.edit', $params),
],
'translate' => [
- 'title' => t('Translate'),
+ 'title' => $this->t('Translate'),
'url' => Url::fromRoute('metatag_views.metatags.translate_overview', $params),
],
'revert' => [
- 'title' => t('Revert'),
+ 'title' => $this->t('Revert'),
'url' => Url::fromRoute('metatag_views.metatags.revert', $params),
],
],