Skip to content

Commit e4641ed

Browse files
committed
AC-9028: Admin (backend frontname) url generation enhancement
1 parent 05f80c8 commit e4641ed

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/internal/Magento/Framework/Setup/BackendFrontnameGenerator.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@ class BackendFrontnameGenerator
1414
/**
1515
* Prefix for admin area path
1616
*/
17-
const ADMIN_AREA_PATH_PREFIX = 'admin_';
17+
public const ADMIN_AREA_PATH_PREFIX = 'admin_';
1818

1919
/**
2020
* Length of the backend frontname random part
2121
*/
22-
const ADMIN_AREA_PATH_RANDOM_PART_LENGTH = 7;
22+
public const ADMIN_AREA_PATH_RANDOM_PART_LENGTH = 7;
2323

2424
/**
2525
* Generate Backend name
2626
*
2727
* @return string
2828
*/
29-
public static function generate()
29+
public static function generate() : string
3030
{
31-
return self::ADMIN_AREA_PATH_PREFIX
32-
. strrev(substr(base_convert(random_int(0, PHP_INT_MAX), 10, 36), 0, self::ADMIN_AREA_PATH_RANDOM_PART_LENGTH));
31+
return self::ADMIN_AREA_PATH_PREFIX . strrev(
32+
substr(base_convert(random_int(0, PHP_INT_MAX), 10, 36), 0, self::ADMIN_AREA_PATH_RANDOM_PART_LENGTH)
33+
);
3334
}
3435
}

0 commit comments

Comments
 (0)