public static function PaymentStatusForm::create in Payment 8.2
Same name in this branch
- 8.2 src/Entity/PaymentStatus/PaymentStatusForm.php \Drupal\payment\Entity\PaymentStatus\PaymentStatusForm::create()
- 8.2 src/Entity/Payment/PaymentStatusForm.php \Drupal\payment\Entity\Payment\PaymentStatusForm::create()
Instantiates a new instance of this class.
This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container this instance should use.
Overrides ContentEntityForm::create
File
- src/
Entity/ Payment/ PaymentStatusForm.php, line 44
Class
- PaymentStatusForm
- Provides the payment status update form.
Namespace
Drupal\payment\Entity\PaymentCode
public static function create(ContainerInterface $container) {
/** @var static $form */
$form = parent::create($container);
$plugin_type_manager = $container
->get('plugin.plugin_type_manager');
$form->currentUser = $container
->get('current_user');
$form->paymentStatusPluginType = $plugin_type_manager
->getPluginType('payment_status');
$form->pluginSelectorManager = $container
->get('plugin.manager.plugin.plugin_selector');
$form->urlGenerator = $container
->get('url_generator');
$form->stringTranslation = $container
->get('string_translation');
return $form;
}