mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2026-01-13 10:36:52 +00:00
Refactored code and implemented parts of AccessManagement
This commit is contained in:
@@ -13,9 +13,9 @@ final class FormClassNameService implements FormClassNameServiceInterface
|
||||
const ENTITY_BASE_PATH = 'Infinito\\Entity';
|
||||
|
||||
/**
|
||||
* @var string Folder in which the forms are stored
|
||||
* @var string Folder in which the forms for entities are stored
|
||||
*/
|
||||
const FORM_BASE_PATH = 'Infinito\\Form';
|
||||
const FORM_ENTITY_BASE_PATH = 'Infinito\\Form\\Entity';
|
||||
|
||||
/**
|
||||
* @var string Suffix to identifie form classes
|
||||
@@ -29,7 +29,7 @@ final class FormClassNameService implements FormClassNameServiceInterface
|
||||
*/
|
||||
public function getClass(string $origineClass, string $type = ''): string
|
||||
{
|
||||
$replaced = str_replace(self::ENTITY_BASE_PATH, self::FORM_BASE_PATH, $origineClass);
|
||||
$replaced = str_replace(self::ENTITY_BASE_PATH, self::FORM_ENTITY_BASE_PATH, $origineClass);
|
||||
$withType = $replaced.ucfirst($type);
|
||||
$withSuffix = $withType.self::SUFFIX;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user