You are here

private static function Paths::checkSame in Hook Update Deploy Tools 8

Same name and namespace in other branches
  1. 7 src/Paths.php \HookUpdateDeployTools\Paths::checkSame()

Check to see if two alias values are the same.

Parameters

string $original_alias: The original alias.

string $new_alias: The new alias requested.

Return value

mixed string message if they are the same. bool FALSE if the are not the same.

1 call to Paths::checkSame()
Paths::modifyAlias in src/Paths.php
Change the value of an alias.

File

src/Paths.php, line 107

Class

Paths
Public methods for altering aliases.

Namespace

HookUpdateDeployTools

Code

private static function checkSame($original_alias, $new_alias) {
  if ($original_alias == $new_alias) {

    // They are the same, no need to do anything  Set a message but no error.
    $message = "The requested alias change of '!original' to '!new' is the same.  No alteration required.";
    $variables = array(
      '!original' => $original_alias,
      '!new' => $new_alias,
    );
    $return = Message::make($message, $variables, WATCHDOG_INFO);
    $return = !empty($return) ? $return : TRUE;
  }
  else {
    $return = FALSE;
  }
  return $return;
}