本文整理汇总了PHP中SPFactory::AdmToolbar方法的典型用法代码示例。如果您正苦于以下问题:PHP SPFactory::AdmToolbar方法的具体用法?PHP SPFactory::AdmToolbar怎么用?PHP SPFactory::AdmToolbar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SPFactory
的用法示例。
在下文中一共展示了SPFactory::AdmToolbar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayForm
/**
*
*/
public function displayForm()
{
Sobi::Trigger('Display', $this->name(), array(&$this));
$action = $this->key('action');
echo '<div class="SobiPro" id="SobiPro">' . "\n";
if ($this->get('_compatibility')) {
echo SPFactory::AdmToolbar()->render();
echo $this->legacyMessages();
}
echo $action ? "\n<form action=\"{$action}\" method=\"post\" name=\"adminForm\" id=\"SPAdminForm\" enctype=\"multipart/form-data\" accept-charset=\"utf-8\" >\n" : null;
foreach ($this->_templates as $tpl) {
$template = SPLoader::path($tpl, 'adm.template');
if (!$template) {
$tpl = SPLoader::translatePath($tpl, 'adm.template', false);
Sobi::Error($this->name(), SPLang::e('CANNOT_LOAD_TEMPLATE_AT', $tpl), SPC::ERROR, 500, __LINE__, __FILE__);
} else {
include $template;
}
}
if (count($this->_hidden)) {
$this->_hidden[SPFactory::mainframe()->token()] = 1;
$prefix = null;
if (!$this->get('_compatibility')) {
$prefix = 'SP_';
}
foreach ($this->_hidden as $name => $value) {
echo "\n<input type=\"hidden\" name=\"{$name}\" id=\"{$prefix}{$name}\" value=\"{$value}\"/>";
}
}
echo $action ? "\n</form>\n" : null;
echo '</div>';
Sobi::Trigger('AfterDisplay', $this->name());
}
示例2: display
/**
*
*/
public function display()
{
$tpl = SPLoader::path($this->_template . '_override', 'adm.template');
if (!$tpl) {
$tpl = SPLoader::path($this->_template, 'adm.template');
}
if (!$tpl) {
$tpl = SPLoader::translatePath($this->_template, 'adm.template', false);
Sobi::Error($this->name(), SPLang::e('TEMPLATE_DOES_NOT_EXISTS', $tpl), SPC::ERROR, 500, __LINE__, __FILE__);
exit;
}
Sobi::Trigger('Display', $this->name(), array(&$this));
$action = $this->key('action');
echo "\n<!-- SobiPro output -->\n";
echo '<div class="SobiPro" id="SobiPro">' . "\n";
if ($this->_legacy) {
echo SPFactory::AdmToolbar()->render();
echo $this->legacyMessages();
echo '<div class="row-fluid">' . "\n";
}
echo $action ? "\n<form action=\"{$action}\" method=\"post\" name=\"adminForm\" id=\"SPAdminForm\" enctype=\"multipart/form-data\" accept-charset=\"utf-8\" >\n" : null;
$prefix = null;
if (!$this->_legacy) {
$prefix = 'SP_';
}
include $tpl;
if (count($this->_hidden)) {
$this->_hidden[SPFactory::mainframe()->token()] = 1;
$this->_hidden['spsid'] = microtime(true) + Sobi::My('id') * mt_rand(5, 15) / mt_rand(5, 15);
foreach ($this->_hidden as $name => $value) {
echo "\n<input type=\"hidden\" name=\"{$name}\" id=\"{$prefix}{$name}\" value=\"{$value}\"/>";
}
}
echo $action ? "\n</form>\n" : null;
if ($this->_legacy) {
echo '</div>' . "\n";
}
echo '</div>' . "\n";
echo "\n<!-- SobiPro output end -->\n";
Sobi::Trigger('AfterDisplay', $this->name());
}