public static function WebformContentCreatorUtilities::contentTypeFields in Webform Content Creator 8
Same name and namespace in other branches
- 3.x src/WebformContentCreatorUtilities.php \Drupal\webform_content_creator\WebformContentCreatorUtilities::contentTypeFields()
Return the content type fields.
Parameters
Drupal\node\Entity\NodeType $contentType: Content type entity.
Return value
array Content type fields
5 calls to WebformContentCreatorUtilities::contentTypeFields()
- WebformContentCreatorEntity::createNode in src/
Entity/ WebformContentCreatorEntity.php - Create node from webform submission.
- WebformContentCreatorEntity::updateNode in src/
Entity/ WebformContentCreatorEntity.php - Update node from webform submission.
- WebformContentCreatorManageFieldsForm::constructTable in src/
Form/ WebformContentCreatorManageFieldsForm.php - Constructs table with mapping between webform and content type.
- WebformContentCreatorManageFieldsForm::validateForm in src/
Form/ WebformContentCreatorManageFieldsForm.php - Form validation handler.
- WebformContentCreatorUtilities::getContentFieldsIds in src/
WebformContentCreatorUtilities.php - Get content type fields, except the basic fields from node type entity.
File
- src/
WebformContentCreatorUtilities.php, line 199
Class
- WebformContentCreatorUtilities
- Provides useful functions required in Webform content creator module.
Namespace
Drupal\webform_content_creatorCode
public static function contentTypeFields(NodeType $contentType) {
$entityManager = \Drupal::service(self::ENTITY_MANAGER);
$fields = [];
if (!empty($contentType)) {
$fields = $entityManager
->getFieldDefinitions('node', $contentType
->getOriginalId());
}
return $fields;
}