You are here

function eva_plugin_display_entity::get_path in EVA: Entity Views Attachment 7

Specify the path of the entity.

Overrides views_plugin_display::get_path

File

./eva_plugin_display_entity.inc, line 286

Class

eva_plugin_display_entity
The plugin that handles entity-attached views.

Code

function get_path() {
  if ($path = parent::get_path()) {
    return $path;
  }
  if (isset($this->view->current_entity)) {
    $uri = entity_uri($this->view->display_handler
      ->get_option('entity_type'), $this->view->current_entity);
    if ($uri) {
      $uri['options']['absolute'] = TRUE;
      return url($uri['path'], $uri['options']);
    }
  }
}