function views_handler_field_fontyourface_enable_disable::render in @font-your-face 7.2
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field::render
File
- modules/
fontyourface_ui/ views/ views_handler_field_fontyourface_enable_disable.inc, line 28 - Views handler.
Class
- views_handler_field_fontyourface_enable_disable
- Field handler to present font enable/disable link.
Code
function render($values) {
$enabled = $this
->get_value($values, 'enabled');
$fid = $this
->get_value($values, 'fid');
$destination = drupal_get_destination();
if ($enabled) {
return l(t('Disable'), 'admin/appearance/fontyourface/disable/' . $fid . '?' . drupal_http_build_query($destination), array(
'attributes' => array(
'class' => 'disable-link',
),
));
}
else {
return l(t('Enable'), 'admin/appearance/fontyourface/enable/' . $fid . '?' . drupal_http_build_query($destination), array(
'attributes' => array(
'class' => 'enable-link',
),
));
}
// else
}