protected function PaymentStatusForm::getParentPaymentStatusSelector in Payment 8.2
Gets the parent payment status selector.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state:
Return value
\Drupal\plugin\Plugin\Plugin\PluginSelector\PluginSelectorInterface
File
- src/
Entity/ PaymentStatus/ PaymentStatusForm.php, line 166
Class
- PaymentStatusForm
- Provides the payment status add/edit form.
Namespace
Drupal\payment\Entity\PaymentStatusCode
protected function getParentPaymentStatusSelector(FormStateInterface $form_state) {
$key = 'parent_payment_status_selector';
if ($form_state
->has($key)) {
$plugin_selector = $form_state
->get($key);
}
else {
$plugin_selector = $this->pluginSelectorManager
->createInstance('payment_select_list');
$plugin_selector
->setSelectablePluginType($this->paymentStatusPluginType);
$plugin_selector
->setCollectPluginConfiguration(FALSE);
$plugin_selector
->setLabel($this
->t('Parent status'));
$form_state
->set($key, $plugin_selector);
}
return $plugin_selector;
}