metatag_views.inc 657 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * @file
  4. * Custom classes used with the Metatag:Views module.
  5. */
  6. if (class_exists('i18n_string_object_wrapper')) {
  7. /**
  8. * i18n object overrides.
  9. */
  10. class metatag_views_i18n_metatag extends i18n_string_object_wrapper {
  11. /**
  12. * Get base keys for translating this object.
  13. */
  14. public function get_string_context() {
  15. // This will result in a context like
  16. // 'metatag_views:view_name__page:description' for the 'description' tag
  17. // on the 'page' display of the 'view_name' view.
  18. return array('metatag_views', $this->object->view_id . METATAG_VIEWS_CONTEXT_SEPARATOR . $this->object->id);
  19. }
  20. }
  21. }