protected function MappingForm::pluginHasSettingsForm in Feeds 8.3
Checks if the given plugin has a settings form.
Parameters
\Drupal\feeds\Plugin\Type\Target\TargetInterface $plugin: The target plugin.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the complete form.
Return value
bool TRUE if it has a settings form. False otherwise.
1 call to MappingForm::pluginHasSettingsForm()
- MappingForm::buildRow in src/
Form/ MappingForm.php - Builds a single mapping row.
File
- src/
Form/ MappingForm.php, line 400
Class
- MappingForm
- Provides a form for mapping settings.
Namespace
Drupal\feeds\FormCode
protected function pluginHasSettingsForm(TargetInterface $plugin, FormStateInterface $form_state) {
if (!$plugin instanceof ConfigurableTargetInterface) {
// Target is not configurable.
return FALSE;
}
if (!$plugin instanceof PluginFormInterface) {
// Target plugin does not provide a settings form.
return FALSE;
}
$settings_form = $plugin
->buildConfigurationForm([], $form_state);
return !empty($settings_form);
}