You are here

function views_skinr_ui_element_title in Skinr 8.2

Same name and namespace in other branches
  1. 7.2 modules/views.skinr.inc \views_skinr_ui_element_title()

Implements hook_skinr_ui_element_title().

File

modules/views.skinr.inc, line 43
Implements Skinr hooks for views.module.

Code

function views_skinr_ui_element_title($element_type, $element, $theme_name) {
  if ($element_type == 'view') {
    list($name, $display_id) = explode('__', $element, 2);
    if ($view = Views::getView($name)) {
      $view
        ->setDisplay($display_id);
      return t('!view: !display', array(
        '!view' => $view->storage
          ->label(),
        '!display' => $view
          ->getDisplay()->display['display_title'],
      ));
    }
  }
}