You are here

class BoxTestPlugin in Boxes 7.2

Hierarchy

Expanded class hierarchy of BoxTestPlugin

2 string references to 'BoxTestPlugin'
boxes_test_boxes_types in tests/boxes_test.module
Implements hook_box_types().
BoxTests::testBoxTypeURL in ./boxes.test
Test the URL of the boxes types

File

tests/boxes_test.module, line 61

View source
class BoxTestPlugin extends BoxPlugin {
  public function values() {
    return array(
      'test_boolean' => TRUE,
      'test_string' => t('String'),
      'test_array' => array(
        'test_array_1' => 'test_array_1',
      ),
    );
  }
  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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BoxPlugin::$plugin_info protected property
BoxPlugin::$type public property
BoxPlugin::buildURL public function Build the URL string Overrides BoxTypePluginInterface::buildURL
BoxPlugin::getDescription public function Get the description Overrides BoxTypePluginInterface::getDescription
BoxPlugin::getInfo public function Get Plugin info Overrides BoxTypePluginInterface::getInfo
BoxPlugin::getLabel public function Get the label Overrides BoxTypePluginInterface::getLabel
BoxPlugin::isEditable public function Is the box type editable Overrides BoxTypePluginInterface::isEditable
BoxPlugin::setBox public function Add a Box to the plugin Overrides BoxTypePluginInterface::setBox
BoxPlugin::submit public function React to the saving of the box Overrides BoxTypePluginInterface::submit
BoxPlugin::validate public function The plugin validation function Overrides BoxTypePluginInterface::validate
BoxPlugin::view public function Return the block content. Overrides BoxTypePluginInterface::view
BoxPlugin::__construct public function Constructor Overrides BoxTypePluginInterface::__construct
BoxTestPlugin::form public function The Plugin Form Overrides BoxPlugin::form
BoxTestPlugin::values public function Define the form values and their defaults Overrides BoxPlugin::values