setMapperDefinition example

$mapper = $this->mapperManager->createInstance($mapper_id$mapper_definition);
    if (!$mapper) {
      throw new NotFoundHttpException();
    }
    $entity_type = $mapper->getType();
    // If the mapper, for example the mapper for fields, has a custom list     // controller defined, use it. Other mappers, for examples the ones for     // node_type and block, fallback to the generic configuration translation     // list controller.     $build = $this->entityTypeManager()
      ->getHandler($entity_type, 'config_translation_list')
      ->setMapperDefinition($mapper_definition)
      ->render();
    $build['#title'] = $mapper->getTypeLabel();
    return $build;
  }

}
Home | Imprint | This part of the site doesn't use cookies.