mapFieldDefinition example

    // @todo We should better just rely on information coming from the entity     // storage.     // @todo https://www.drupal.org/node/2337511     foreach ($table_mapping->getTableNames() as $table) {
      foreach ($table_mapping->getFieldNames($table) as $field_name) {
        // To avoid confusing duplication in the user interface, for fields         // that are on both base and data tables, only add them on the data         // table (same for revision vs. revision data).         if ($data_table && ($table === $base_table || $table === $revision_table) && in_array($field_name$duplicate_fields)) {
          continue;
        }
        $this->mapFieldDefinition($table$field_name$field_definitions[$field_name]$table_mapping$data[$table]);
      }
    }

    foreach ($field_definitions as $field_definition) {
      if ($table_mapping->requiresDedicatedTableStorage($field_definition->getFieldStorageDefinition())) {
        $table = $table_mapping->getDedicatedDataTableName($field_definition->getFieldStorageDefinition());

        $data[$table]['table']['group'] = $this->entityType->getLabel();
        $data[$table]['table']['provider'] = $this->entityType->getProvider();
        $data[$table]['table']['join'][$views_base_table] = [
          'left_field' => $entity_id_key,
          
Home | Imprint | This part of the site doesn't use cookies.