You are here

function panels_add_button in Panels 5

Same name and namespace in other branches
  1. 5.2 panels.module \panels_add_button()

Add a single button to a form.

1 call to panels_add_button()
panels_add_buttons in ./panels.module
add the buttons to a content item

File

./panels.module, line 165

Code

function panels_add_button($image, $name, $text) {
  $module_path = base_path() . drupal_get_path('module', 'panels');
  return array(
    '#type' => 'panels_imagebutton',
    '#image' => $module_path . '/images/' . $image,
    '#title' => $text,
    '#default_value' => $name,
  );
}