public function DonationBlock::build in Commerce Donate 8
Builds the donation form.
Return value
array A render array.
Overrides BlockPluginInterface::build
File
- src/
Plugin/ Block/ DonationBlock.php, line 65
Class
- DonationBlock
- Provides a donation block.
Namespace
Drupal\commerce_donate\Plugin\BlockCode
public function build() {
// Could use block settings to get the predefined amounts to show, pass
// them to getForm() as the second argument.
return $this->formBuilder
->getForm(DonationForm::class);
}