class video_views_handler_field_image in Video 6.2
Field handler to display the video preview thumbnail
Hierarchy
- class \video_views_handler_field_image extends \views_handler_field
Expanded class hierarchy of video_views_handler_field_image
1 string reference to 'video_views_handler_field_image'
- video_views_data in views/
video.views.inc - Provides views data and enumerates handlers for video.module
File
- views/
video_views_handler_field_image.inc, line 16
View source
class video_views_handler_field_image extends views_handler_field {
/**
* Define options available for this field.
*/
function option_definition() {
$options = parent::option_definition();
$options['img_type'] = array(
'default' => 'thumbnail',
);
$options['disp_link'] = array(
'default' => TRUE,
);
return $options;
}
/**
* Build option configuration form.
*/
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['img_type'] = array(
'#title' => t('Show image as'),
'#type' => 'select',
'#options' => array(
'thumbnail' => t('Thumbnail'),
'preview' => t('Preview'),
),
'#default_value' => $this->options['img_type'],
);
$form['disp_link'] = array(
'#title' => t('Link image to video'),
'#type' => 'checkbox',
'#default_value' => $this->options['disp_link'],
);
}
/**
* Render field output to the browser.
*/
function render($values) {
return _video_views_handler_field_image($values, $this->options['img_type'], $this->options['disp_link']);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
video_views_handler_field_image:: |
function | Build option configuration form. | ||
video_views_handler_field_image:: |
function | Define options available for this field. | ||
video_views_handler_field_image:: |
function | Render field output to the browser. |