Returns EasyAdmin entity entry name for a FQCN.

@param string $entityFqcn

@return string

@throws \RuntimeException
420379
public function guessEntityEntry(string $entityFqcn)
    {
        $matchingEntityConfigs = \array_filter(
            $this->easyAdminConfig['entities'],
            function ($entityConfig) use ($entityFqcn) {
                return $entityFqcn === $entityConfig['class'];
            }
        );

        if (empty($matchingEntityConfigs)) {
            throw new \RuntimeException(
                \sprintf('No entity defined in EasyAdmin configuration matches %s FQCN.', $entityFqcn)
            );
        }

        if (1 < \count($matchingEntityConfigs)) {
            throw new \RuntimeException(
                \sprintf('More than 1 entity defined in EasyAdmin configuration matches %s FQCN.', $entityFqcn)
            );
        }

        return (string) \key($matchingEntityConfigs);
    }
876098
public function getMapper($fqcn)
    {
        if (!isset($this->mappers[$fqcn])) {
            $this->mappers[$fqcn] = $this->createMapper($fqcn);
        }

        return $this->mappers[$fqcn];
    }
586002
protected function splitFullQualifyClassName($fqcn)
    {
        $parts = explode('\\', $fqcn);
        $classname = array_pop($parts);
        return [implode('\\', $parts), $classname];
    }
417148
public static final String fqServerName()
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "fqServerName");

        String fqServerName = _serverName; // RLSUtils.FQHAMCompatibleServerName(_cellName,_nodeName,_serverName); tWAS

        if (tc.isEntryEnabled())
            Tr.exit(tc, "fqServerName", fqServerName);
        return fqServerName;
    }
942126
public function getEntityConfig(string $paramName): EntityFactoryConfig
    {
        if (!$this->hasEntity($paramName)) {
            throw new RuntimeException("Unknown entity parameter");
        }

        return $this->entities[$paramName];
    }
972139
protected function getFullEntityName () : string
    {
        $entityClass = $this->classNameTransformer->transformModelToEntity(static::class);

        if (!\class_exists($entityClass))
        {
            throw new AutoConfigurationFailedException(\sprintf(
                "Cannot automatically generate entity name for model '%s', guessed '%s'.",
                static::class,
                $entityClass
            ));
        }

        return $entityClass;
    }
234791
private final static function getInstance($fqcn, $name)
    {
        $instances = self::getInstances($fqcn);

        if (!isset($instances[$name])) {
            return null;
        } else {
            return $instances[$name];
        }
    }
811527
public function getQName()
	{
		// Use the cached name if there is one.
		if ( ! $this->qname )
		{
			if ( ! property_exists( $this, 'name' ) ) return null;
			$this->qname = $qname = new QName( $this->name['originalPrefix'], $this->name['namespace'], $this->name['name'] );
		}

		return $this->qname;
	}
807640
public function getHasSingularInterfaceFqnForEntity(
        string $entityFqn
    ): string {
        try {
            $interfaceNamespace = $this->getInterfacesNamespaceForEntity($entityFqn);

            return $interfaceNamespace . '\\Has' . ucfirst($entityFqn::getDoctrineStaticMeta()->getSingular())
                   . 'Interface';
        } catch (\Exception $e) {
            throw new DoctrineStaticMetaException(
                'Exception in ' . __METHOD__ . ': ' . $e->getMessage(),
                $e->getCode(),
                $e
            );
        }
    }
663073
public static function getClassNameFromFQN(string $name): string
    {
        $arr = explode('\\', $name);

        return (string)array_pop($arr);
    }
290932
protected function getEntityName()
    {
        if ($this->entityName === null) {
            $name = $this->entityClass;

            if (false !== $pos = strrpos($name, '\\')) {
                $name = substr($name, $pos + 1);
            }
            $name = strtolower(preg_replace('/([^A-Z])([A-Z])/', "$1_$2", $name));
            $name = str_replace('-', '_', $name);
            $this->entityName = $name;
        }

        return $this->entityName;
    }
1089429
public function getCachePrefix()
    {
        if ($this->cachePrefix) {
            return $this->cachePrefix;
        }

        $class = $this->getClassName();

        if (!in_array(TaggedEntityInterface::class, class_implements($class))) {
            throw new \RuntimeException(sprintf(
                'The entity %s does not implements %s, query should not be cached.',
                $class, TaggedEntityInterface::class
            ));
        }

        return $this->cachePrefix = call_user_func([$this->getClassName(), 'getEntityTagPrefix']);
    }
997647
public function fromNamespace($fqnn)
    {
        $name = str_replace('\\', '.', ltrim((string) $fqnn, '\\'));

        // convert root namespace to default; default is a keyword and no namespace CAN be named as such
        if ($name === '') {
            $name = 'default';
        }

        return $name;
    }
142815
public static String getHostnameFromFQDN(String fqdn) {
		if (fqdn == null) {
			throw new IllegalArgumentException("fqdn is null");
		}
		int dotPos = fqdn.indexOf('.');
		if (dotPos == -1) {
			return fqdn;
		} else {
			return fqdn.substring(0, dotPos);
		}
	}
144114
public function getEntityLabel(EntityInterface $entity) {
    $profiles = $this->entityTypeManager->getStorage('profile')
      ->loadByProperties([
        'uid' => $entity->field_account->target_id,
      ]);

    /** @var \Drupal\profile\Entity\ProfileInterface $profile */
    $profile = reset($profiles);

    // It must be a Guest so we pick the name values we can get.
    if (!$profile) {
      $name = '';
      $first_name = $entity->get('field_first_name')->getValue()[0]['value'];
      $last_name = $entity->get('field_last_name')->getValue()[0]['value'];
      if (!empty($first_name)) {
        $name .= $first_name;
        $name .= ' ';
      }
      if (!empty($last_name)) {
        $name .= $last_name;
      }

      return $name;
    }

    /** @var \Drupal\Core\StringTranslation\TranslatableMarkup $label */
    $label = $profile->label();

    return $label->getArguments()['@name'];
  }
13482
public function getSaverForEntityFqn(string $entityFqn): EntitySaverInterface
    {
        $saverFqn = $this->getSaverFqn($entityFqn);
        if (class_exists($saverFqn)) {
            return new $saverFqn($this->entityManager, $this->namespaceHelper);
        }

        return $this->genericSaver;
    }
949425
private function retrieveFormFieldDescription(AdminInterface $admin, $field)
    {
        $admin->getFormFieldDescriptions();

        $fieldDescription = $admin->getFormFieldDescription($field);

        if (!$fieldDescription) {
            throw new \RuntimeException(sprintf('The field "%s" does not exist.', $field));
        }

        if (null === $fieldDescription->getTargetEntity()) {
            throw new \RuntimeException(sprintf('No associated entity with field "%s".', $field));
        }

        return $fieldDescription;
    }