You are here

public function InstapageCmsPluginDrupal7Connector::lang in Instapage plugin 8.3

Same name and namespace in other branches
  1. 7.3 core/connectors/InstapageCmsPluginDrupal7Connector.php \InstapageCmsPluginDrupal7Connector::lang()

Gets the value of language variable.

File

core/connectors/InstapageCmsPluginDrupal7Connector.php, line 532

Class

InstapageCmsPluginDrupal7Connector
Class that utilizes native Drupal 7 functions to perform actions like remote requests and DB operations.

Code

public function lang() {
  $arguments = func_get_arg(0);
  if (!count($arguments)) {
    return null;
  }
  $text = $arguments[0];
  $variables = array_slice($arguments, 1);
  if (!count($variables)) {
    return $text;
  }
  return vsprintf($text, $variables);
}