You are here

class TestForm in Coder 8.2

Same name in this branch
  1. 8.2 coder_sniffer/DrupalPractice/Test/Objects/GlobalFunctionUnitTest.inc \TestForm
  2. 8.2 coder_sniffer/DrupalPractice/Test/Objects/GlobalDrupalUnitTest.inc \TestForm
  3. 8.2 coder_sniffer/DrupalPractice/Test/Objects/GlobalClassUnitTest.inc \TestForm
Same name and namespace in other branches
  1. 8.3 tests/DrupalPractice/Objects/GlobalDrupalUnitTest.inc \TestForm
  2. 8.3 tests/DrupalPractice/Objects/GlobalClassUnitTest.inc \TestForm
  3. 8.3 tests/DrupalPractice/Objects/drupal8/TestForm.php \TestForm
  4. 8.3.x tests/DrupalPractice/Objects/GlobalDrupalUnitTest.inc \TestForm
  5. 8.3.x tests/DrupalPractice/Objects/GlobalClassUnitTest.inc \TestForm
  6. 8.3.x tests/DrupalPractice/Objects/drupal8/TestForm.php \TestForm

Hierarchy

Expanded class hierarchy of TestForm

File

coder_sniffer/DrupalPractice/Test/Objects/GlobalClassUnitTest.inc, line 5

View source
class TestForm extends FormBase {
  public function buildForm($form, $form_state) {
    $form['something'] = NodeType::load('article');
  }
  public static function something() {

    // Global classes are allowed in static methods.
    return NodeType::load('article');
  }

}

Members