You are here

public function MiniDonationBlock::build in Commerce Donate 8

Builds the donation form.

Return value

array A render array.

Overrides BlockPluginInterface::build

File

src/Plugin/Block/MiniDonationBlock.php, line 65

Class

MiniDonationBlock
Provides a donation block.

Namespace

Drupal\commerce_donate\Plugin\Block

Code

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(MiniDonationForm::class);
}