You are here

public static function WebformContentCreatorUtilities::getContentFieldsIds in Webform Content Creator 3.x

Same name and namespace in other branches
  1. 8 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 $content_type: 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_creator

Code

public static function getContentFieldsIds(NodeType $content_type) {
  $node_fields = self::contentTypeFields($content_type);
  $ids = array_keys($node_fields);
  return array_filter($ids, function ($fid) {
    return strpos($fid, 'field_') === 0 || in_array($fid, self::CONTENT_BASIC_FIELDS);
  });
}