class BeanTestPlugin in Bean (for Drupal 7) 7
Hierarchy
- class \BeanPlugin implements BeanTypePluginInterface
- class \BeanTestPlugin
 
 
Expanded class hierarchy of BeanTestPlugin
2 string references to 'BeanTestPlugin'
- BeanUnitTests::testBeanTypeURL in tests/
BeanUnitTests.test  - Test the URL of the bean types.
 - bean_test_bean_types in tests/
bean_test.module  - Implements hook_bean_types().
 
File
- tests/
bean_test.module, line 61  - Primary hook implementations for the Bean Test module.
 
View source
class BeanTestPlugin extends BeanPlugin {
  public function values() {
    return array(
      'test_boolean' => TRUE,
      'test_string' => t('String'),
      'test_array' => array(
        'test_array_1' => 'test_array_1',
      ),
    );
  }
  public function form($bean, $form, &$form_state) {
    $form = array();
    $form['test_boolean'] = array(
      '#type' => 'textfield',
      '#title' => t('String'),
      '#default_value' => $bean->test_string,
    );
    $form['test_boolean'] = array(
      '#type' => 'checkbox',
      '#title' => t('Boolean'),
      '#default_value' => $bean->test_boolean,
    );
    $form['test_array'] = array(
      '#type' => 'string',
      '#title' => t('Array'),
      '#default_value' => $bean->test_array['test_array_1'],
    );
    return $form;
  }
}