You are here

function commerce_pricelist_theme in Commerce Pricelist 7

Same name and namespace in other branches
  1. 8.2 commerce_pricelist.module \commerce_pricelist_theme()

Implements hook_theme().

We need run our forms through custom theme functions in order to build the table structure which is required by tabledrag.js. Before we can use our custom theme functions, we need to implement hook_theme in order to register them with Drupal.

We are defining our theme hooks with the same name as the form generation function so that Drupal automatically calls our theming function when the form is displayed.

File

./commerce_pricelist.module, line 555
Implements the basic functionality required for price lists

Code

function commerce_pricelist_theme() {
  return array(
    // Theme function for the 'simple' example.
    'commerce_pricelist_draggable_form' => array(
      'render element' => 'form',
    ),
  );
}