public static function PaymentFormConfigurationForm::create in Payment 8.2
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 ConfigFormBase::create
1 call to PaymentFormConfigurationForm::create()
- PaymentFormConfigurationFormTest::testCreate in modules/
payment_form/ tests/ src/ Unit/ Plugin/ Payment/ Type/ PaymentFormConfigurationFormTest.php - @covers ::create @covers ::__construct
File
- modules/
payment_form/ src/ Plugin/ Payment/ Type/ PaymentFormConfigurationForm.php, line 53
Class
- PaymentFormConfigurationForm
- Provides the configuration form for the payment_form payment type plugin.
Namespace
Drupal\payment_form\Plugin\Payment\TypeCode
public static function create(ContainerInterface $container) {
/** @var \Drupal\plugin\PluginType\PluginTypeManagerInterface $plugin_type_manager */
$plugin_type_manager = $container
->get('plugin.plugin_type_manager');
return new static($container
->get('config.factory'), $container
->get('string_translation'), $container
->get('plugin.manager.payment.method'), $plugin_type_manager
->getPluginType('plugin_selector'));
}