protected function EntityExportFormBuilder::addExportFieldsToEntityForm in Content Synchronizer 8
Same name and namespace in other branches
- 8.2 src/Service/EntityExportFormBuilder.php \Drupal\content_synchronizer\Service\EntityExportFormBuilder::addExportFieldsToEntityForm()
- 3.x src/Service/EntityExportFormBuilder.php \Drupal\content_synchronizer\Service\EntityExportFormBuilder::addExportFieldsToEntityForm()
Add exports fields to the entity form.
Parameters
array $form: The form build array.
\Drupal\Core\Form\FormStateInterface $formState: The form state.
1 call to EntityExportFormBuilder::addExportFieldsToEntityForm()
- EntityExportFormBuilder::addExportFields in src/
Service/ EntityExportFormBuilder.php - Add the export submform in the entity edition form, if the entity is exportable.
File
- src/
Service/ EntityExportFormBuilder.php, line 75
Class
- EntityExportFormBuilder
- The entity export form builder.
Namespace
Drupal\content_synchronizer\ServiceCode
protected function addExportFieldsToEntityForm(array &$form, FormStateInterface $formState) {
$entity = $formState
->getFormObject()
->getEntity();
$isBundle = $entity instanceof ConfigEntityBundleBase;
if ($entity instanceof ContentEntityBase || $isBundle) {
$this
->initExportForm($entity, $form, $formState, $isBundle);
}
}