You are here

public function BusinessRulesUtil::getFieldsSchema in Business Rules 8

Same name and namespace in other branches
  1. 2.x src/Util/BusinessRulesUtil.php \Drupal\business_rules\Util\BusinessRulesUtil::getFieldsSchema()

Return a the mapping fields for a given entity config schema.

It's based on *.schema.yml file.

Parameters

string $schema_name: The schema name.

Return value

array Array with schema fields.

File

src/Util/BusinessRulesUtil.php, line 1146

Class

BusinessRulesUtil
Class BusinessRulesUtil.

Namespace

Drupal\business_rules\Util

Code

public function getFieldsSchema($schema_name) {
  $schema = \Drupal::service('config.typed')
    ->getDefinition($schema_name);
  $result = $this
    ->getMappingsArray($schema);
  return $result;
}