|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/afglcweb/ny/sites/all/modules/views/plugins/ |
Upload File : |
<?php
// $Id: views_plugin_style_grid.inc,v 1.1 2008/09/03 19:21:30 merlinofchaos Exp $
/**
* @file
* Contains the grid style plugin.
*/
/**
* Style plugin to render each item in a grid cell.
*
* @ingroup views_style_plugins
*/
class views_plugin_style_grid extends views_plugin_style {
/**
* Set default options
*/
function option_definition() {
$options = parent::option_definition();
$options['columns'] = array('default' => '4');
$options['alignment'] = array('default' => 'horizontal');
return $options;
}
/**
* Render the given style.
*/
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['columns'] = array(
'#type' => 'textfield',
'#title' => t('Number of columns'),
'#default_value' => $this->options['columns'],
);
$form['alignment'] = array(
'#type' => 'radios',
'#title' => t('Alignment'),
'#options' => array('horizontal' => t('Horizontal'), 'vertical' => t('Vertical')),
'#default_value' => $this->options['alignment'],
'#description' => t('Horizontal alignment will place items starting in the upper left and moving right. Vertical alignment will place items starting in the upper left and moving down.'),
);
}
}