You are here

public function Check::getMachineTitle in Security Review 8

Returns the machine name of the check.

Naming rules (if overridden):

  • All characters should be lowerspace.
  • Use characters only from the english alphabet.
  • Don't use spaces (use "_" instead).

Return value

string ID of check.

1 call to Check::getMachineTitle()
Check::id in src/Check.php
Returns the identifier constructed using the namespace and title values.
5 methods override Check::getMachineTitle()
AdminPermissions::getMachineTitle in src/Checks/AdminPermissions.php
Returns the machine name of the check.
Field::getMachineTitle in src/Checks/Field.php
Returns the machine name of the check.
FilePermissions::getMachineTitle in src/Checks/FilePermissions.php
Returns the machine name of the check.
InputFormats::getMachineTitle in src/Checks/InputFormats.php
Returns the machine name of the check.
UploadExtensions::getMachineTitle in src/Checks/UploadExtensions.php
Returns the machine name of the check.

File

src/Check.php, line 114

Class

Check
Defines a security check.

Namespace

Drupal\security_review

Code

public function getMachineTitle() {
  $title = strtolower($this
    ->getTitle());
  $title = preg_replace("/[^a-z0-9 ]/", '', $title);
  $title = str_replace(' ', '_', $title);
  return $title;
}