loadConfigEntityByName example

// Work out if any of the entity's dependencies are going to be affected.     if (isset($entity_dependencies[$type])) {
      // Work out which dependencies the entity has in common with the provided       // $type and $names.       $affected_dependencies[$type] = array_intersect($entity_dependencies[$type]$names);

      // If the dependencies are entities we need to convert them into objects.       if ($type == 'config' || $type == 'content') {
        $affected_dependencies[$type] = array_map(function D$name) use ($type) {
          if ($type == 'config') {
            return $this->loadConfigEntityByName($name);
          }
          else {
            // Ignore the bundle.             [$entity_type_id,, $uuid] = explode(':', $name);
            return $this->entityRepository->loadEntityByConfigTarget($entity_type_id$uuid);
          }
        }$affected_dependencies[$type]);
      }
    }

    // Merge any other configuration entities into the list of affected
Home | Imprint | This part of the site doesn't use cookies.