class ViewsFractionsliderStylePlugin in Views FractionSlider 7.2
Implementation of views_plugin_style().
Hierarchy
- class \views_object
- class \views_plugin
- class \views_plugin_style
- class \views_plugin
Expanded class hierarchy of ViewsFractionsliderStylePlugin
1 string reference to 'ViewsFractionsliderStylePlugin'
- views_fractionslider_views_plugins in views/
views_fractionslider.views.inc - Implements hook_views_plugin().
File
- views/
views_fractionslider_style_plugin.inc, line 11 - Provide an fractionslider style plugin for Views.
View source
class ViewsFractionsliderStylePlugin extends views_plugin_style {
/**
* Set default options.
*/
public function option_definition() {
$options = parent::option_definition();
return $options;
}
/**
* Render the given style.
*/
public function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['general_settings'] = array(
'#type' => 'fieldset',
'#title' => t('General Settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['class'] = array(
'#title' => t('Div class'),
'#description' => t('The class to provide on the Div element itself. In addition with "slide" class.'),
'#type' => 'textfield',
'#size' => '30',
'#default_value' => $this->options['class'],
'#fieldset' => 'general_settings',
);
$form['pager'] = array(
'#type' => 'select',
'#title' => t('Pager'),
'#options' => array(
'true' => t('True'),
'false' => t('False'),
),
'#default_value' => $this->options['pager'],
'#description' => t('Set Pager True or False. Default is True.'),
'#fieldset' => 'general_settings',
);
$form['controls'] = array(
'#type' => 'select',
'#title' => t('Controls'),
'#options' => array(
'true' => t('True'),
'false' => t('False'),
),
'#default_value' => $this->options['controls'],
'#description' => t('Set Controls True or False. Default is True.'),
'#fieldset' => 'general_settings',
);
$form['views_dimensions'] = array(
'#type' => 'textfield',
'#title' => t('Dimensions'),
'#default_value' => $this->options['views_dimensions'] ? $this->options['views_dimensions'] : '1000, 400',
'#description' => t('Default: 1000, 400'),
'#fieldset' => 'general_settings',
);
$form['views_fullwidth'] = array(
'#type' => 'select',
'#title' => t('Full width'),
'#options' => array(
'false' => t('False'),
'true' => t('True'),
),
'#default_value' => $this->options['views_fullwidth'],
'#description' => t('Transition over the full width of the window. Default: false'),
'#fieldset' => 'general_settings',
);
$form['views_responsive'] = array(
'#type' => 'select',
'#title' => t('Responsive'),
'#options' => array(
'false' => t('False'),
'true' => t('True'),
),
'#default_value' => $this->options['views_responsive'],
'#description' => t('Default: true'),
'#fieldset' => 'general_settings',
);
$form['views_increase'] = array(
'#type' => 'select',
'#title' => t('Increase'),
'#options' => array(
'false' => t('False'),
'true' => t('True'),
),
'#default_value' => $this->options['views_increase'],
'#description' => t('If set, slider is allowed to get bigger than basic dimensions. Default: false'),
'#fieldset' => 'general_settings',
);
$form['fields_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Fields Settings'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$current_display = $this->row_plugin->view->display_handler->options['defaults']['fields'] ? 'default' : $this->row_plugin->view->current_display;
$fields = $this->view->display[$current_display]->display_options['fields'];
foreach ($fields as $key => $field) {
$form[$field['id']] = array(
'#type' => 'fieldset',
'#title' => check_plain($field['field']),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#fieldset' => 'fields_settings',
);
$form[$field['id']]['data-in'] = array(
'#type' => 'select',
'#title' => t('data-in'),
'#options' => array(
'left' => t('left'),
'fade' => t('fade'),
'none' => t('none'),
'right' => t('right'),
'top' => t('top'),
'bottom' => t('bottom'),
'bottomLeft' => t('bottomLeft'),
'bottomRight' => t('bottomRight'),
'topLeft' => t('topLeft'),
'topRight' => t('topRight'),
),
'#default_value' => !empty($this->options[$field['id']]) ? $this->options[$field['id']]['data-in'] : '',
'#description' => t('Type of the in-animation (default is left).'),
'#fieldset' => $field['id'],
);
$form[$field['id']]['data-out'] = array(
'#type' => 'select',
'#title' => t('data-out'),
'#options' => array(
'fade' => t('fade'),
'none' => t('none'),
'left' => t('left'),
'right' => t('right'),
'top' => t('top'),
'bottom' => t('bottom'),
'bottomLeft' => t('bottomLeft'),
'bottomRight' => t('bottomRight'),
'topLeft' => t('topLeft'),
'topRight' => t('topRight'),
),
'#default_value' => !empty($this->options[$field['id']]) ? $this->options[$field['id']]['data-out'] : '',
'#description' => t('Type of the out-animation (default is fade).'),
'#fieldset' => $field['id'],
);
$form[$field['id']]['data-step'] = array(
'#type' => 'select',
'#title' => t('data-step'),
'#options' => array(
0 => t('0'),
1 => t('1'),
2 => t('2'),
3 => t('3'),
4 => t('4'),
5 => t('5'),
6 => t('6'),
7 => t('7'),
8 => t('8'),
9 => t('9'),
),
'#default_value' => !empty($this->options[$field['id']]) ? $this->options[$field['id']]['data-step'] : '',
'#description' => t('You can group your elements in different steps. All animation of one step will start at the same time (maybe with your choosen element-specific data-delay). Elements of the next step will not start before the previous step is finished. If an element has no data-step attribute the plugin will thread it as having data-step=”0″.'),
'#fieldset' => $field['id'],
);
$form[$field['id']]['data-ease-in'] = array(
'#type' => 'select',
'#title' => t('data-ease-in'),
'#options' => array(
'' => t('-None-'),
'linear' => t('linear'),
'swing' => t('swing'),
'easeInQuad' => t('easeInQuad'),
'easeOutQuad' => t('easeOutQuad'),
'easeInOutQuad' => t('easeInOutQuad'),
'easeInCubic' => t('easeInCubic'),
'easeOutCubic' => t('easeOutCubic'),
'easeInOutCubic' => t('easeInOutCubic'),
'easeInQuart' => t('easeInQuart'),
'easeOutQuart' => t('easeOutQuart'),
'easeInOutQuart' => t('easeInOutQuart'),
'easeInQuint' => t('easeInQuint'),
'easeOutQuint' => t('easeOutQuint'),
'easeInOutQuint' => t('easeInOutQuint'),
'easeInExpo' => t('easeInExpo'),
'easeOutExpo' => t('easeOutExpo'),
'easeInOutExpo' => t('easeInOutExpo'),
'easeInSine' => t('easeInSine'),
'easeOutSine' => t('easeOutSine'),
'easeInOutSine' => t('easeInOutSine'),
'easeInCirc' => t('easeInCirc'),
'easeOutCirc' => t('easeOutCirc'),
'easeInOutCirc' => t('easeInOutCirc'),
'easeInElastic' => t('easeInElastic'),
'easeOutElastic' => t('easeOutElastic'),
'easeInOutElastic' => t('easeInOutElastic'),
'easeInBack' => t('easeInBack'),
'easeOutBack' => t('easeOutBack'),
'easeInOutBack' => t('easeInOutBack'),
'easeInBounce' => t('easeInBounce'),
'easeOutBounce' => t('easeOutBounce'),
'easeInOutBounce' => t('easeInOutBounce'),
),
'#default_value' => !empty($this->options[$field['id']]) ? $this->options[$field['id']]['data-ease-in'] : '',
'#description' => t('easing for the animations (you can use all in jquery-ui contained <a target="_blank" href="http://jqueryui.com/effect/#easing">easing methods)</a>.'),
'#fieldset' => $field['id'],
);
$form[$field['id']]['data-ease-out'] = array(
'#type' => 'select',
'#title' => t('data-ease-out'),
'#options' => array(
'' => t('-None-'),
'linear' => t('linear'),
'swing' => t('swing'),
'easeInQuad' => t('easeInQuad'),
'easeOutQuad' => t('easeOutQuad'),
'easeInOutQuad' => t('easeInOutQuad'),
'easeInCubic' => t('easeInCubic'),
'easeOutCubic' => t('easeOutCubic'),
'easeInOutCubic' => t('easeInOutCubic'),
'easeInQuart' => t('easeInQuart'),
'easeOutQuart' => t('easeOutQuart'),
'easeInOutQuart' => t('easeInOutQuart'),
'easeInQuint' => t('easeInQuint'),
'easeOutQuint' => t('easeOutQuint'),
'easeInOutQuint' => t('easeInOutQuint'),
'easeInExpo' => t('easeInExpo'),
'easeOutExpo' => t('easeOutExpo'),
'easeInOutExpo' => t('easeInOutExpo'),
'easeInSine' => t('easeInSine'),
'easeOutSine' => t('easeOutSine'),
'easeInOutSine' => t('easeInOutSine'),
'easeInCirc' => t('easeInCirc'),
'easeOutCirc' => t('easeOutCirc'),
'easeInOutCirc' => t('easeInOutCirc'),
'easeInElastic' => t('easeInElastic'),
'easeOutElastic' => t('easeOutElastic'),
'easeInOutElastic' => t('easeInOutElastic'),
'easeInBack' => t('easeInBack'),
'easeOutBack' => t('easeOutBack'),
'easeInOutBack' => t('easeInOutBack'),
'easeInBounce' => t('easeInBounce'),
'easeOutBounce' => t('easeOutBounce'),
'easeInOutBounce' => t('easeInOutBounce'),
),
'#default_value' => !empty($this->options[$field['id']]) ? $this->options[$field['id']]['data-ease-out'] : '',
'#description' => t('easing for the animations (you can use all in jquery-ui contained <a target="_blank" href="http://jqueryui.com/effect/#easing">easing methods)</a>.'),
'#fieldset' => $field['id'],
);
$form[$field['id']]['data-time'] = array(
'#title' => t('Data Time'),
'#description' => t('Time after which the elements animation is complete. It will start at the beginning of the slide/step, or after its specificed delay. Default is 1000. Add 00 for none/instead of 0.'),
'#type' => 'textfield',
'#size' => '10',
'#default_value' => !empty($this->options[$field['id']]) ? $this->options[$field['id']]['data-time'] : '1000',
'#fieldset' => $field['id'],
);
$form[$field['id']]['space'] = array(
'#title' => t('Field Spacing Top'),
'#description' => t('The Space/Gap between fields while sliding. Similar padding-top. Default is 30. Add 00 for none/instead of 0.'),
'#type' => 'textfield',
'#size' => '10',
'#default_value' => !empty($this->options[$field['id']]) ? $this->options[$field['id']]['space'] : '30',
'#fieldset' => $field['id'],
);
$form[$field['id']]['lspace'] = array(
'#title' => t('Field Spacing Left'),
'#description' => t('The Space/Gap between fields while sliding. Similar padding-left. Default is 30. Add 00 for none/instead of 0.'),
'#type' => 'textfield',
'#size' => '10',
'#default_value' => !empty($this->options[$field['id']]) ? $this->options[$field['id']]['lspace'] : '30',
'#fieldset' => $field['id'],
);
}
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ViewsFractionsliderStylePlugin:: |
public | function |
Render the given style. Overrides views_plugin_style:: |
|
ViewsFractionsliderStylePlugin:: |
public | function |
Set default options. Overrides views_plugin_style:: |
|
views_object:: |
public | property | Handler's definition. | |
views_object:: |
public | property | Except for displays, options for the object will be held here. | 1 |
views_object:: |
function | Collect this handler's option definition and alter them, ready for use. | ||
views_object:: |
public | function | Views handlers use a special construct function. | 4 |
views_object:: |
public | function | 1 | |
views_object:: |
public | function | ||
views_object:: |
public | function | Always exports the option, regardless of the default value. | |
views_object:: |
public | function | Set default options on this object. | 1 |
views_object:: |
public | function | Set default options. | |
views_object:: |
public | function | Let the handler know what its full definition is. | |
views_object:: |
public | function | Unpack options over our existing defaults, drilling down into arrays so that defaults don't get totally blown away. | |
views_object:: |
public | function | Unpack a single option definition. | |
views_object:: |
public | function | Unpacks each handler to store translatable texts. | |
views_object:: |
public | function | ||
views_plugin:: |
public | property | The current used views display. | |
views_plugin:: |
public | property | The plugin name of this plugin, for example table or full. | |
views_plugin:: |
public | property | The plugin type of this plugin, for example style or query. | |
views_plugin:: |
public | property |
The top object of a view. Overrides views_object:: |
1 |
views_plugin:: |
public | function | Provide a list of additional theme functions for the theme info page. | |
views_plugin:: |
public | function | Handle any special handling on the validate form. | 9 |
views_plugin:: |
public | function | Return the human readable name of the display. | |
views_plugin:: |
public | function | Returns the summary of the settings in the display. | 8 |
views_plugin:: |
public | function | Provide a full list of possible theme templates used by this style. | |
views_plugin_style:: |
public | property | The row plugin, if it's initialized and the style itself supports it. | |
views_plugin_style:: |
public | property | Store all available tokens row rows. | |
views_plugin_style:: |
public | function | Called by the view builder to see if this style handler wants to interfere with the sorts. If so it should build; if it returns any non-TRUE value, normal sorting will NOT be added to the query. | 1 |
views_plugin_style:: |
public | function | Called by the view builder to let the style build a second set of sorts that will come after any other sorts in the view. | 1 |
views_plugin_style:: |
public | function |
Destructor. Overrides views_object:: |
|
views_plugin_style:: |
public | function | Should the output of the style plugin be rendered even if it's empty. | 1 |
views_plugin_style:: |
public | function | Get a rendered field. | |
views_plugin_style:: |
public | function | Get the raw field value. | |
views_plugin_style:: |
public | function | Return the token replaced row class for the specified row. | |
views_plugin_style:: |
public | function | Initialize a style plugin. | |
views_plugin_style:: |
public | function |
Validate the options form. Overrides views_plugin:: |
|
views_plugin_style:: |
public | function | Allow the style to do stuff before each row is rendered. | |
views_plugin_style:: |
public | function |
Add anything to the query that we might need to. Overrides views_plugin:: |
2 |
views_plugin_style:: |
public | function | Render the display in this style. | 5 |
views_plugin_style:: |
public | function | Render all of the fields for a given style and store them on the object. | |
views_plugin_style:: |
public | function | Group records as needed for rendering. | |
views_plugin_style:: |
public | function | Render the grouping sets. | |
views_plugin_style:: |
public | function | Take a value and apply token replacement logic to it. | |
views_plugin_style:: |
public | function | Return TRUE if this style also uses fields. | |
views_plugin_style:: |
public | function | Return TRUE if this style also uses a row plugin. | |
views_plugin_style:: |
public | function | Return TRUE if this style also uses a row plugin. | |
views_plugin_style:: |
public | function | Return TRUE if this style uses tokens. | |
views_plugin_style:: |
public | function |
Validate that the plugin is correct and can be saved. Overrides views_plugin:: |