You are here

function spaces_handler_field_node::render_link in Spaces 7.3

Same name and namespace in other branches
  1. 6.3 includes/spaces_handler_field_node.inc \spaces_handler_field_node::render_link()
  2. 7 includes/spaces_handler_field_node.inc \spaces_handler_field_node::render_link()

Override of render_link(). Add purl options to link if 'frontpage' option is enabled. Note that the PURL url is generated using 'absolute' to keep from overriding *all* of render_as_link().

Overrides views_handler_field_node::render_link

File

includes/spaces_handler_field_node.inc, line 64

Class

spaces_handler_field_node

Code

function render_link($data, $values) {
  parent::render_link($data, $values);
  if ($data !== NULL && $data !== '' && !empty($this->options['spaces']['frontpage']) && !empty($this->options['spaces']['type'])) {
    $this->options['alter']['path'] = url('<front>', array(
      'absolute' => TRUE,
      'purl' => array(
        'provider' => $this->options['spaces']['type'],
        'id' => $values->{$this->aliases['nid']},
      ),
    ));
  }
  return $data;
}