本文整理汇总了PHP中Msg::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Msg::get方法的具体用法?PHP Msg::get怎么用?PHP Msg::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Msg
的用法示例。
在下文中一共展示了Msg::get方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: message
function message($key = "message.defaultMessage", $scope = "global") {
$retval = "";
$sessionMsg = Session::load(MSG_SCOPE, $scope);
if (!empty($sessionMsg)) {
reset($sessionMsg);
$retval .= Msg::get("message.extra.warning");
foreach ($sessionMsg as $message) {
$retval .= "<div>".$message["string"]."</div>\n";
}
} else {
$retval = Msg::get("message.extra.tooltip").Msg::get($key);
}
return $retval;
}
示例2: datetime
function datetime($format, Date $date) {
// TODO you can only use dd MM yy yyyy HH mm ss
$format = Msg::get($format);
$patterns[0] = '/dd/';
$patterns[1] = '/MM/';
$patterns[2] = '/yyyy/';
$patterns[3] = '/yy/';
$patterns[4] = '/HH/';
$patterns[5] = '/mm/';
$patterns[6] = '/ss/';
$replacements[6] = sprintf("%02d", $date->date);
$replacements[5] = sprintf("%02d", $date->month);
$replacements[4] = sprintf("%04d", $date->year);
$replacements[3] = sprintf("%02d", $date->year % 100);
$replacements[2] = sprintf("%02d", $date->hour);
$replacements[1] = sprintf("%02d", $date->minute);
$replacements[0] = sprintf("%02d", $date->second);
echo preg_replace($patterns, $replacements, $format);
}
示例3: addMsgMessage
function addMsgMessage($key, $field = null, $param = null) {
if ($field != null) {
$param[] = Msg::get($field);
}
$this->addMsgString(Msg::get($key, $param), $field);
}
示例4: foreach
<?php
foreach (Msg::get() as $msg) {
?>
<div class="alert alert-<?php
echo $msg['status'];
?>
alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<strong><?php
switch ($msg['status']) {
case 'success':
echo 'Успех!';
break;
case 'danger':
case 'warning':
echo 'Внимание!';
break;
default:
echo 'Информация.';
}
?>
</strong> <?php
echo $msg['text'];
?>
</div>
<?php
}
Msg::flush();
示例5:
<td>:</td>
<td><?=nl2br($this->lookup["type"])?></td>
</tr>
<tr>
<td><?=Msg::get("lookup.code")?></td>
<td>:</td>
<td><?=nl2br($this->lookup["code"])?></td>
</tr>
<tr>
<td><?=Msg::get("lookup.name")?></td>
<td>:</td>
<td><?=nl2br($this->lookup["name"])?></td>
</tr>
<tr>
<td><?=Msg::get("lookup.description")?></td>
<td>:</td>
<td><?=nl2br($this->lookup["description"])?></td>
</tr>
<tr>
<td><?=Msg::get("lookup.priority")?></td>
<td>:</td>
<td><?=nl2br($this->lookup["priority"])?></td>
</tr>
<tr>
<td colspan="3" class="Command">
<?=FormTag::back("command.back", "lookup")?>
</td>
</tr>
</table>
</div>
</div>
示例6: back
function back($name, $url) {
$value = Msg::get($name);
return "<input type=\"button\" class=\"Button\" id=\"$name\" name=\"$name\" value=\"$value\" onclick=\"window.location.href = '".Apu::base()."/$url'\"/>\n";
}
示例7:
<div class="Title"><?=Msg::get("LookupAction.search.title")?></div>
<div class="Message"><?=Msg::message("LookupAction.search.description")?></div>
<div align="center">
<table class="Form">
<tr>
<td><?=Msg::get("lookup.type")?></td>
<td>:</td>
<td><?=FormTag::text("list.filter.type", $this->list["filter"]["type"])?></td>
</tr>
<tr>
<td><?=Msg::get("lookup.code")?></td>
<td>:</td>
<td><?=FormTag::text("list.filter.code", $this->list["filter"]["code"])?></td>
</tr>
<tr>
<td colspan="3" class="Command">
<?=FormTag::submit("command.search")?>
<input type="button" class="Button" id="clear" value="<?=Msg::get("command.clear")?>"/>
<script type="text/javascript">
Event.observe($('clear'), "click", LookupList.clear);
</script>
<input type="button" class="Button" frameId="searchFrame" id="close" value="<?=Msg::get("command.close")?>"/>
<script type="text/javascript">
Event.observe($('close'), "click", LookupList.close);
</script>
</td>
</tr>
</table>
</div>
</div>
</form>
示例8:
</script>
<form method="post" action="login/login">
<div class="Frame" style="width: 400px" id="login">
<div class="Title"><?=Msg::get("LoginAction.title")?></div>
<div class="Message"><?=Msg::message("LoginAction.description")?></div>
<div style="height: 130px">
<table id="centerized"><tr><td>
<img src="themes/apu/img/security.gif"/>
</td><td>
<table class="Form">
<tr>
<td class="Label"><?=Msg::get("login.username")?></td>
<td>:</td>
<td><?=FormTag::text("login.username", $this->login["username"])?></td>
</tr>
<tr>
<td class="Label"><?=Msg::get("login.password")?></td>
<td>:</td>
<td><?=FormTag::password("login.password", $this->login["password"])?></td>
</tr>
<tr>
<td colspan="3" class="Command">
<?=FormTag::submit("command.login")?>
</td>
</tr>
</table>
</td></tr></table>
</div>
</div>
</form>
示例9: if
<a href="task/add">
<img src="themes/apu/img/new.png" />
</a>
</th>
</tr>
<? if (!empty($_REQUEST["list"])) { ?>
<? reset($_REQUEST["list"]); ?>
<? while(list(,$row) = each($_REQUEST["list"])) { ?>
<tr class="Row<?=$i%2?>">
<td><?=$row["priority"]?></td>
<td><?=$row["context"]?></td>
<td><?=$row["project"]?></td>
<td><?=$row["title"]?></td>
<td><?=$row["created_by"]?></td>
<td><?=$row["status"]?></td>
<td>
<a href="">
<img src="themes/apu/img/edit.png" />
</a>
<a href="">
<img src="themes/apu/img/del.png" />
</a>
</td>
</tr>
<?} ?>
<? } else { ?>
<tr class="Row0">
<td colspan="100" align="center"><?=Msg::get("message.emptyRow") ?></td>
</tr>
<? } ?>
</table>
示例10: array
color: #3333AA;
}
div.Frame {
margin-top: 7px;
margin-bottom: 3px;
}
</style>
<script type="text/javascript" src="themes/prototype.js"></script>
<h2>Todo App</h2>
<div id="welcomeNote">
<?=Msg::get("welcome.note", array( UserDao::loginFullName() ))?><br/>
<?=$_REQUEST["date"] ?>
</div>
<? reset($_REQUEST["menu"]); ?>
<? while (list($key, $menu) = each($_REQUEST["menu"])) { ?>
<div class="Frame">
<div class="Title"><?=Msg::get($menu["name"])?></div>
<? if (!empty($menu["children"])) { ?>
<div>
<? while (list($subKey, $subMenu) = each($menu["children"])) { ?>
<a class="Menu" href="<?=$subMenu["action"]?>" style="display: block;padding:2px 2px 2px 2px" target="<?=(empty($subMenu["target"]))?"main":$subMenu["target"]?>"><?=Msg::get($subMenu["name"])?></a>
<? } ?>
</div>
<? } ?>
</div>
<? } ?>