Exemple #1
0
 /**
  * Get output for a language variable (L_FOO, LA_FOO)
  *
  * This function checks to see if the language var was outputted to $context
  * (e.g. in the ACP, L_TITLE)
  * If not, we return the result of $user->lang()
  *
  * @return string
  */
 function lang()
 {
     $args = func_get_args();
     $key = $args[0];
     $context = $this->context->get_data_ref();
     $context_vars = $context['.'][0];
     if (isset($context_vars['L_' . $key])) {
         return $context_vars['L_' . $key];
     }
     // LA_ is transformed into lang(\'$1\')|addslashes, so we should not
     // need to check for it
     return call_user_func_array(array($this->user, 'lang'), $args);
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert')
 {
     return $this->context->alter_block_array($blockname, $vararray, $key, $mode);
 }