/** * @param string $entityClass * * @return EntityAlias|bool|null */ protected function getEntityAliasFromConfig($entityClass) { // check for the exclusion list if ($this->config->isEntityAliasExclusionExist($entityClass)) { return false; } // check for explicitly configured aliases if ($this->config->hasEntityAlias($entityClass)) { return $this->config->getEntityAlias($entityClass); } return null; }
/** * {@inheritdoc} */ public function getEntityAlias($entityClass) { // check for the exclusion list if ($this->config->isEntityAliasExclusionExist($entityClass)) { return false; } // check for explicitly configured aliases if ($this->config->hasEntityAlias($entityClass)) { return $this->config->getEntityAlias($entityClass); } // check Gedmo translatable entities if (is_a($entityClass, 'Gedmo\\Translatable\\Entity\\MappedSuperclass\\AbstractTranslation', true)) { return false; } if (is_a($entityClass, 'Gedmo\\Translatable\\Entity\\MappedSuperclass\\AbstractPersonalTranslation', true)) { return false; } // generate default aliases $name = $this->getEntityName($entityClass); return new EntityAlias(strtolower($name), strtolower(Inflector::pluralize($name))); }