/** * Translates text * * @param String * @param Array * @return String */ public static function translate($string, $params = null) { if (ncChangeLogConfigHandler::isI18NActive()) { if (sfContext::hasInstance()) { sfContext::getInstance()->getConfiguration()->loadHelpers('I18N'); return __($string, $params, 'nc_change_log_behavior'); } } return $string; }
/** * Uses the formatter 'formatUpdateChange' method to render this change. * * @return String */ public function render() { return ncChangeLogConfigHandler::getFormatter()->formatUpdateChange($this); }
protected static function getUsername() { if (sfContext::hasInstance()) { $user = sfContext::getInstance()->getUser(); $method = ncChangeLogConfigHandler::getUsernameMethod(); if (method_exists($user, $method)) { return $user->{$method}(); } } // Use a default username. return ncChangeLogConfigHandler::getUsernameCli(); }
<?php echo sfOutputEscaper::unescape($change->getOldValue(true)); ?> <?php } else { ?> <?php echo $change->getOldValue(true); ?> <?php } ?> </td> <td> <?php if (ncChangeLogConfigHandler::shouldEscapeValues()) { ?> <?php echo sfOutputEscaper::unescape($change->getNewValue(true)); ?> <?php } else { ?> <?php echo $change->getNewValue(true); ?> <?php } ?> </td> </tr>