function panels_views_legacy_edit in Panels 5.2
Returns an edit form for a block.
1 call to panels_views_legacy_edit()
- panels_views_legacy_add in panels_views_legacy/
panels_views_legacy.module - Returns the form for a new view.
1 string reference to 'panels_views_legacy_edit'
- panels_views_legacy_panels_content_types in panels_views_legacy/
panels_views_legacy.module - Implementation of hook_panels_content_types()
File
- panels_views_legacy/
panels_views_legacy.module, line 232 - panels_views_legacy.module
Code
function panels_views_legacy_edit($id, $parents, $conf) {
$form['view'] = array(
'#type' => 'value',
'#default_value' => $conf['view'],
);
$form['type'] = array(
'#type' => 'select',
'#default_value' => $conf['type'],
'#title' => t('View type'),
'#description' => t('Select which type of the view to display.'),
'#options' => array(
'page' => t('Page'),
'block' => t('Block'),
'embed' => t('Embedded'),
),
);
$form['link_to_view'] = array(
'#type' => 'checkbox',
'#default_value' => $conf['link_to_view'],
'#title' => t('Link title to view'),
'#description' => t('If checked, the title will be a link to the view.'),
);
$form['more_link'] = array(
'#type' => 'checkbox',
'#default_value' => $conf['more_link'],
'#title' => t('Provide a "more" link that links to the view'),
'#description' => t('This is independent of any more link that may be provided by the view itself; if you see two more links, turn this one off. Views will only provide a more link if using the "block" type, however, so if using embed, use this one.'),
);
$form['feed_icons'] = array(
'#type' => 'checkbox',
'#default_value' => $conf['feed_icons'],
'#title' => t('Display feed icons'),
'#description' => t('If checked, any feed icons provided by this view will be displayed.'),
);
$form['pager_aligner_start'] = array(
'#value' => '<div class="option-text-aligner">',
);
$form['use_pager'] = array(
'#type' => 'checkbox',
'#title' => t('Use pager'),
'#default_value' => $conf['use_pager'],
'#id' => 'use-pager-checkbox',
);
$form['pager_id'] = array(
'#type' => 'textfield',
'#default_value' => $conf['pager_id'],
'#title' => t('Pager ID'),
'#size' => 4,
'#id' => 'use-pager-textfield',
);
$form['pager_aligner_stop'] = array(
'#value' => '</div><div style="clear: both; padding: 0; margin: 0"></div>',
);
$form['nodes_per_page'] = array(
'#type' => 'textfield',
'#default_value' => $conf['nodes_per_page'],
'#title' => t('Num posts'),
'#size' => 4,
'#description' => t('Select the number of posts to display, or 0 to display all results.'),
);
$form['offset'] = array(
'#type' => 'textfield',
'#default_value' => $conf['offset'],
'#title' => t('Offset'),
'#size' => 4,
'#description' => t('Offset in the node list or 0 to start at 1st item.'),
);
$form['panel_args'] = array(
'#type' => 'checkbox',
'#title' => t('Send arguments'),
'#default_value' => $conf['panel_args'],
'#description' => t('Select this to send all arguments from the panel directly to the view. If checked, the panel arguments will come after any context arguments above and precede any additional arguments passed in through the Arguments field below.'),
);
$form['args'] = array(
'#type' => 'textfield',
'#default_value' => $conf['args'],
'#title' => t('Arguments'),
'#size' => 30,
'#description' => t('Additional arguments to send to the view as if they were part of the URL in the form of arg1/arg2/arg3. You may use %0, %1, ..., %N to grab arguments from the URL. Or use @0, @1, @2, ..., @N to use arguments passed into the panel.'),
);
$form['url'] = array(
'#type' => 'textfield',
'#default_value' => $conf['url'],
'#title' => t('Override URL'),
'#size' => 30,
'#description' => t('If this is set, override the View URL; this can sometimes be useful to set to the panel URL'),
);
return $form;
}