TestFormBlock.php
Same filename in other branches
Namespace
Drupal\block_test\Plugin\BlockFile
-
core/
modules/ block/ tests/ modules/ block_test/ src/ Plugin/ Block/ TestFormBlock.php
View source
<?php
namespace Drupal\block_test\Plugin\Block;
use Drupal\Core\Block\Attribute\Block;
use Drupal\Core\Block\BlockBase;
use Drupal\Core\StringTranslation\TranslatableMarkup;
/**
* Provides a block to test caching.
*/
class TestFormBlock extends BlockBase {
/**
* {@inheritdoc}
*/
public function build() {
return \Drupal::formBuilder()->getForm('Drupal\\block_test\\Form\\TestForm');
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
TestFormBlock | Provides a block to test caching. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.