You are here

function views_ui_add_button in Views (for Drupal 7) 5

Add a single button to a form.

1 call to views_ui_add_button()
views_ui_add_buttons in ./views_ui.module
Add the up, down, top, bottom, delete buttons to a form.

File

./views_ui.module, line 1603

Code

function views_ui_add_button($image, $name, $text) {
  $module_path = base_path() . drupal_get_path('module', 'views');
  return array(
    '#type' => 'views_imagebutton',
    '#image' => $module_path . '/' . $image,
    '#title' => $text,
    '#default_value' => $name,
  );
}