You are here

public function GdprFieldConfigEntity::getFieldsForBundle in General Data Protection Regulation 3.0.x

Same name and namespace in other branches
  1. 8.2 modules/gdpr_fields/src/Entity/GdprFieldConfigEntity.php \Drupal\gdpr_fields\Entity\GdprFieldConfigEntity::getFieldsForBundle()
  2. 8 modules/gdpr_fields/src/Entity/GdprFieldConfigEntity.php \Drupal\gdpr_fields\Entity\GdprFieldConfigEntity::getFieldsForBundle()

Gets all field configuration for a bundle.

Parameters

string $bundle: The bundle.

Return value

\Drupal\gdpr_fields\Entity\GdprField[] Array of fields within this bundle keyed by field name.

File

modules/gdpr_fields/src/Entity/GdprFieldConfigEntity.php, line 139

Class

GdprFieldConfigEntity
Defines a GDPR Field configuration entity.

Namespace

Drupal\gdpr_fields\Entity

Code

public function getFieldsForBundle($bundle) {
  return array_map(static function ($field) {
    return new GdprField($field);
  }, $this->bundles[$bundle]);
}