You are here

public function BoxTestPlugin::form in Boxes 7.2

The Plugin Form

The Box object will be either loaded from the database or filled with the defaults.

_state

Parameters

$box:

$form:

Return value

form array

Overrides BoxPlugin::form

File

tests/boxes_test.module, line 72

Class

BoxTestPlugin

Code

public function form($box, $form, &$form_state) {
  $form = array();
  $form['test_boolean'] = array(
    '#type' => 'textfield',
    '#title' => t('String'),
    '#default_value' => $box->test_string,
  );
  $form['test_boolean'] = array(
    '#type' => 'checkbox',
    '#title' => t('Boolean'),
    '#default_value' => $box->test_boolean,
  );
  $form['test_array'] = array(
    '#type' => 'string',
    '#title' => t('Array'),
    '#default_value' => $box->test_array['test_array_1'],
  );
  return $form;
}