function panels_add_button in Panels 5.2
Same name and namespace in other branches
- 5 panels.module \panels_add_button()
Add a single button to a form.
3 calls to panels_add_button()
- panels_common_add_item_to_form in includes/
common.inc - Add a row to the form. Used both in the main form and by the ajax to add an item.
- panels_content_config_add_form_submit in includes/
display_edit.inc - panels_edit_display in includes/
display_edit.inc - Form definition for the panels display editor
File
- ./
panels.module, line 278 - panels.module Core API for Panels. Provides display editing and rendering capabilities.
Code
function panels_add_button($image, $name, $text, $class, $id = NULL) {
return array(
'#type' => 'panels_imagebutton',
'#image' => panels_get_path('images/' . $image),
'#title' => $text,
'#default_value' => $name,
'#class' => $class,
'#id' => $id,
);
}