Gets the list of links used by this field.
array The links which are used by the render function.
protected function getLinks() {
$links = array();
foreach ($this->options['fields'] as $field) {
if (empty($this->view->field[$field]->last_render_text)) {
continue;
}
$title = $this->view->field[$field]->last_render_text;
$path = '';
if (!empty($this->view->field[$field]->options['alter']['path'])) {
$path = $this->view->field[$field]->options['alter']['path'];
}
// Make sure that tokens are replaced for this paths as well.
$tokens = $this
->getRenderTokens(array());
$path = strip_tags(decode_entities(strtr($path, $tokens)));
$links[$field] = array(
'href' => $path,
'title' => $title,
);
if (!empty($this->options['destination'])) {
$links[$field]['query'] = drupal_get_destination();
}
}
return $links;
}