本文整理汇总了PHP中Toolbar::addAction方法的典型用法代码示例。如果您正苦于以下问题:PHP Toolbar::addAction方法的具体用法?PHP Toolbar::addAction怎么用?PHP Toolbar::addAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Toolbar
的用法示例。
在下文中一共展示了Toolbar::addAction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Toolbar
case 'forget':
$t = new Toolbar();
$t->addAction('Back', 'show()', 'go-back');
$c->register($t);
if ($trackid = getvar('trackid', '')) {
$c->displayMsg("OK, forgetting id={$trackid}.");
} else {
$c->displayMsg("I was supposed to receive an id to forget.");
}
break;
/* --------------------------------------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------------------------------------- */
case 'play':
// We create the toolbar
$t = new Toolbar();
$t->addAction('Back', 'show()', 'go-back');
$t->addAction('Play', 'togglePlay()', 'media-playback-start');
$t->addRawBlock("<div id='clock' class='clock'></div>");
$t->addAction('Reset', 'trackReset()', 'media-playback-stop');
$c->register($t);
// We should receive a scalefactor.
$scl = floatval(getvar('scl', '0.7'));
// We must receive an id.
if ($trackid = getvar('trackid', '')) {
// ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// We obtain some data from the participant first.
$q->rawSelect('name as project,pid,agent,from_unixtime(offset/1000) as start')->from('track')->where("id={$trackid}");
$ppt = $q->runAndGetRow();
if ($ppt['project'] == '') {
$ppt['project'] = '<em>None</em>';
}