class TestFormBlock

Same name in other branches
  1. 9 core/modules/block/tests/modules/block_test/src/Plugin/Block/TestFormBlock.php \Drupal\block_test\Plugin\Block\TestFormBlock
  2. 10 core/modules/block/tests/modules/block_test/src/Plugin/Block/TestFormBlock.php \Drupal\block_test\Plugin\Block\TestFormBlock
  3. 11.x core/modules/block/tests/modules/block_test/src/Plugin/Block/TestFormBlock.php \Drupal\block_test\Plugin\Block\TestFormBlock

Provides a block to test caching.

Plugin annotation


@Block(
  id = "test_form_in_block",
  admin_label = @Translation("Test form block caching")
)

Hierarchy

Expanded class hierarchy of TestFormBlock

File

core/modules/block/tests/modules/block_test/src/Plugin/Block/TestFormBlock.php, line 15

Namespace

Drupal\block_test\Plugin\Block
View source
class TestFormBlock extends BlockBase {
    
    /**
     * {@inheritdoc}
     */
    public function build() {
        return \Drupal::formBuilder()->getForm('Drupal\\block_test\\Form\\TestForm');
    }

}

Members

Title Sort descending Modifiers Object type Summary
TestFormBlock::build public function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.