You are here

public static function RenameAdminPathsValidator::isDefaultPath in Rename Admin Paths 8.2

Verify users not overwriting with the default path names, could lead to broken routes

Parameters

string $value:

Return value

bool

3 calls to RenameAdminPathsValidator::isDefaultPath()
RenameAdminPathsSettingsForm::validate in src/Form/RenameAdminPathsSettingsForm.php
Form element validation handler.
RenameAdminPathsValidatorTest::testDefaultPath in tests/src/Unit/Form/RenameAdminPathsValidatorTest.php
@dataProvider nonDefaultPaths
RenameAdminPathsValidatorTest::testMatchDefaultPath in tests/src/Unit/Form/RenameAdminPathsValidatorTest.php
@dataProvider defaultPaths

File

src/Form/RenameAdminPathsValidator.php, line 29

Class

RenameAdminPathsValidator

Namespace

Drupal\rename_admin_paths\Form

Code

public static function isDefaultPath(string $value) : bool {
  return in_array(strtolower($value), RenameAdminPathsEventSubscriber::ADMIN_PATHS);
}