function panelizer_handler_panelizer_status::render in Panelizer 7.3
Same name and namespace in other branches
- 7.2 plugins/views/panelizer_handler_panelizer_status.inc \panelizer_handler_panelizer_status::render()
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field::render
File
- plugins/
views/ panelizer_handler_panelizer_status.inc, line 45
Class
- panelizer_handler_panelizer_status
- Views field handler for rendering node links that point to panelizer tabs.
Code
function render($values) {
if ($entity = $this
->get_value($values)) {
$view_mode = $this->options['view_mode'];
if (!empty($entity->panelizer[$view_mode]->name)) {
$panelizer = ctools_export_crud_load('panelizer_defaults', $entity->panelizer[$view_mode]->name);
$status = !empty($panelizer->title) ? check_plain($panelizer->title) : t('Default');
}
else {
if (!empty($entity->panelizer[$view_mode]->did)) {
$status = $this->options['custom'];
}
else {
$status = $this->options['not_panelized'];
}
}
return $status;
}
}