You are here

TestForm.php in Coder 8.3.x

Same filename and directory in other branches
  1. 8.3 tests/DrupalPractice/Objects/drupal8/TestForm.php

File

tests/DrupalPractice/Objects/drupal8/TestForm.php
View source
<?php

class TestForm extends FormBase {
  public function buildForm($form, $form_state) {
    $form['something'] = t('Example text');
    $form['another'] = $this
      ->t('test');
    $form['again'] = format_date(time());
  }
  public static function example() {

    // t() calls are allowed in static methods.
    return t('Example text');
  }

}

Classes

Namesort descending Description
TestForm