You are here

SimpleCheckoutBlock.php in Stripe 2.x

Same filename and directory in other branches
  1. 8 modules/stripe_examples/src/Plugin/Block/SimpleCheckoutBlock.php

File

modules/stripe_examples/src/Plugin/Block/SimpleCheckoutBlock.php
View source
<?php

namespace Drupal\stripe_examples\Plugin\Block;

use Drupal\Core\Block\BlockBase;

/**
 * Provides a 'Simple checkout' Block.
 *
 * @Block(
 *   id = "stripe_example_checkout",
 *   admin_label = @Translation("Stripe simple checkout"),
 * )
 */
class SimpleCheckoutBlock extends BlockBase {

  /**
   * {@inheritdoc}
   */
  public function build() {
    $form = \Drupal::formBuilder()
      ->getForm('\\Drupal\\stripe_examples\\Form\\SimpleCheckoutForm');
    return $form;
  }

}

Classes

Namesort descending Description
SimpleCheckoutBlock Provides a 'Simple checkout' Block.