public static function WebformContentCreatorUtilities::getContentFieldsIds in Webform Content Creator 8
Same name and namespace in other branches
- 3.x src/WebformContentCreatorUtilities.php \Drupal\webform_content_creator\WebformContentCreatorUtilities::getContentFieldsIds()
Get content type fields, except the basic fields from node type entity.
Parameters
Drupal\node\Entity\NodeType $contentType: Content type entity.
Return value
array Associative array Content type fields
1 call to WebformContentCreatorUtilities::getContentFieldsIds()
- WebformContentCreatorManageFieldsForm::constructTable in src/
Form/ WebformContentCreatorManageFieldsForm.php - Constructs table with mapping between webform and content type.
File
- src/
WebformContentCreatorUtilities.php, line 218
Class
- WebformContentCreatorUtilities
- Provides useful functions required in Webform content creator module.
Namespace
Drupal\webform_content_creatorCode
public static function getContentFieldsIds(NodeType $contentType) {
$nodeFields = self::contentTypeFields($contentType);
$nodeFieldIds = array_keys($nodeFields);
return array_filter($nodeFieldIds, function ($fid) {
return strpos($fid, 'field_') === 0 || in_array($fid, self::CONTENT_BASIC_FIELDS);
});
}