public static function WebformContentCreatorUtilities::bundleFields in Webform Content Creator 2.x
Return the bundle fields.
Parameters
string $entity_type_id: Entity type id.
mixed $bundle_id: Bundle id.
Return value
array Bundle fields
5 calls to WebformContentCreatorUtilities::bundleFields()
- WebformContentCreatorEntity::createContent in src/
Entity/ WebformContentCreatorEntity.php - Create content entity from webform submission.
- WebformContentCreatorEntity::updateContent in src/
Entity/ WebformContentCreatorEntity.php - Update content from webform submission.
- WebformContentCreatorManageFieldsForm::constructTable in src/
Form/ WebformContentCreatorManageFieldsForm.php - Constructs table with mapping between webform and bundle.
- WebformContentCreatorManageFieldsForm::validateForm in src/
Form/ WebformContentCreatorManageFieldsForm.php - Form validation handler.
- WebformContentCreatorUtilities::getBundleIds in src/
WebformContentCreatorUtilities.php - Get bundle fields, except the basic fields.
File
- src/
WebformContentCreatorUtilities.php, line 200
Class
- WebformContentCreatorUtilities
- Provides useful functions required in Webform content creator module.
Namespace
Drupal\webform_content_creatorCode
public static function bundleFields($entity_type_id, $bundle_id) {
$entityManager = \Drupal::service(self::ENTITY_MANAGER);
$fields = [];
if (!empty($bundle_id)) {
$fields = $entityManager
->getFieldDefinitions($entity_type_id, $bundle_id);
}
return $fields;
}