本文整理匯總了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>';
}