You are here

function hook_mongodb_block_ui_configure in MongoDB 7

Configuration form for the mongodb_block_ui.

Parameters

string $delta: Which mongodb_block_ui to return. This is a descriptive string used to identify mongodb_block_uis within each module and also within the theme system. The $delta for each mongodb_block_ui is defined within the array that your module returns when the hook_mongodb_block_ui_info() implementation is called.

Return value

array Optionally return the configuration form.

For a detailed usage example, see mongodb_block_ui_example.module.

File

mongodb_block_ui/mongodb_block_ui.api.php, line 88
Hooks provided by the Block module.

Code

function hook_mongodb_block_ui_configure($delta = '') {
  if ($delta == 'exciting') {
    $form['items'] = array(
      '#type' => 'select',
      '#title' => t('Number of items'),
      // phpcs:ignore
      '#default_value' => variable_get('mymodule_mongodb_block_ui_items', 0),
      '#options' => array(
        '1',
        '2',
        '3',
      ),
    );
    return $form;
  }
}