public function deploy_views_handler_entity_link_field::render in Deploy - Content Staging 7.3
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides deploy_views_handler_base::render
File
- includes/
views/ handler_entity_link_field.inc, line 16 - Deploy Views Entity Link field handler.
Class
- deploy_views_handler_entity_link_field
- Class for handling the Deploy Manager Entity Link "field",
Code
public function render($values) {
$entity = $this
->entity_load($values);
$uri = entity_uri($values->entity_type, $entity);
$label = deploy_plan_entity_label($values->entity_type, $entity, $values->revision_id);
$options = [];
if ($uri['options']) {
$options = $uri['options'];
}
$link = l($label, $uri['path'], $options);
return $link;
}