本文整理汇总了PHP中FOFInput::getBool方法的典型用法代码示例。如果您正苦于以下问题:PHP FOFInput::getBool方法的具体用法?PHP FOFInput::getBool怎么用?PHP FOFInput::getBool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FOFInput
的用法示例。
在下文中一共展示了FOFInput::getBool方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preRender
/**
* Echoes any HTML to show before the view template
*
* @param string $view The current view
* @param string $task The current task
* @param FOFInput $input The input array (request parameters)
* @param array $config The view configuration array
*
* @return void
*/
public function preRender($view, $task, $input, $config = array())
{
$format = $input->getCmd('format', 'html');
if (empty($format)) {
$format = 'html';
}
if ($format != 'html') {
return;
}
if (!FOFPlatform::getInstance()->isCli()) {
// Wrap output in a Joomla-versioned div
$version = new JVersion();
$versionParts = explode('.', $version->RELEASE);
$minorVersion = str_replace('.', '', $version->RELEASE);
$majorVersion = array_shift($versionParts);
echo "<div class=\"joomla-version-{$majorVersion} joomla-version-{$minorVersion}\">\n";
// Wrap output in an akeeba-bootstrap class div
echo "<div class=\"akeeba-bootstrap\">\n";
echo "<div class=\"row-fluid\">\n";
}
// Render submenu and toolbar (only if asked to)
if ($input->getBool('render_toolbar', true)) {
$this->renderButtons($view, $task, $input, $config);
$this->renderLinkbar($view, $task, $input, $config);
}
}
示例2: preRender
/**
* Echoes any HTML to show before the view template
*
* @param string $view The current view
* @param string $task The current task
* @param FOFInput $input The input array (request parameters)
* @param array $config The view configuration array
*
* @return void
*/
public function preRender($view, $task, $input, $config = array())
{
$format = $input->getCmd('format', 'html');
if (empty($format)) {
$format = 'html';
}
if ($format != 'html') {
return;
}
$platform = FOFPlatform::getInstance();
if ($platform->isCli()) {
return;
}
if ($platform->isBackend()) {
// Wrap output in various classes
$version = new JVersion();
$versionParts = explode('.', $version->RELEASE);
$minorVersion = str_replace('.', '', $version->RELEASE);
$majorVersion = array_shift($versionParts);
$option = $input->getCmd('option', '');
$view = $input->getCmd('view', '');
$layout = $input->getCmd('layout', '');
$task = $input->getCmd('task', '');
$classes = ' class="' . implode(array('joomla-version-' . $majorVersion, 'joomla-version-' . $minorVersion, 'admin', $option, 'view-' . $view, 'layout-' . $layout, 'task-' . $task), ' ') . '"';
} else {
$classes = '';
}
echo '<div id="akeeba-renderjoomla"' . $classes . ">\n";
// Render the submenu and toolbar
if ($input->getBool('render_toolbar', true)) {
$this->renderButtons($view, $task, $input, $config);
$this->renderLinkbar($view, $task, $input, $config);
}
}
示例3: preRender
/**
* Echoes any HTML to show before the view template
*
* @param string $view The current view
* @param string $task The current task
* @param FOFInput $input The input array (request parameters)
* @param array $config The view configuration array
*
* @return void
*/
public function preRender($view, $task, $input, $config = array())
{
$format = $input->getCmd('format', 'html');
if (empty($format)) {
$format = 'html';
}
if ($format != 'html') {
return;
}
$platform = FOFPlatform::getInstance();
if ($platform->isCli()) {
return;
}
if (version_compare(JVERSION, '3.0.0', 'lt')) {
JHtml::_('behavior.framework');
} else {
if (version_compare(JVERSION, '3.3.0', 'ge')) {
JHtml::_('behavior.core');
} else {
JHtml::_('behavior.framework', true);
}
JHtml::_('jquery.framework');
}
// Wrap output in various classes
$version = new JVersion();
$versionParts = explode('.', $version->RELEASE);
$minorVersion = str_replace('.', '', $version->RELEASE);
$majorVersion = array_shift($versionParts);
if ($platform->isBackend()) {
$area = $platform->isBackend() ? 'admin' : 'site';
$option = $input->getCmd('option', '');
$view = $input->getCmd('view', '');
$layout = $input->getCmd('layout', '');
$task = $input->getCmd('task', '');
$classes = array('joomla-version-' . $majorVersion, 'joomla-version-' . $minorVersion, $area, $option, 'view-' . $view, 'layout-' . $layout, 'task-' . $task, 'j-toggle-main', 'j-toggle-transition', 'span12');
} elseif ($platform->isFrontend()) {
// @TODO: Remove the frontend Joomla! version classes in FOF 3
$classes = array('joomla-version-' . $majorVersion, 'joomla-version-' . $minorVersion);
}
// Wrap output in divs
echo '<div id="akeeba-bootstrap" class="' . implode($classes, ' ') . "\">\n";
echo "<div class=\"akeeba-bootstrap\">\n";
echo "<div class=\"row-fluid\">\n";
// Render submenu and toolbar (only if asked to)
if ($input->getBool('render_toolbar', true)) {
$this->renderButtons($view, $task, $input, $config);
$this->renderLinkbar($view, $task, $input, $config);
}
}
示例4: preRender
/**
* Echoes any HTML to show before the view template
*
* @param string $view The current view
* @param string $task The current task
* @param FOFInput $input The input array (request parameters)
* @param array $config The view configuration array
*
* @return void
*/
public function preRender($view, $task, $input, $config = array())
{
$format = $input->getCmd('format', 'html');
if (empty($format)) {
$format = 'html';
}
if ($format != 'html') {
return;
}
// Render the submenu and toolbar
if ($input->getBool('render_toolbar', true)) {
$this->renderButtons($view, $task, $input, $config);
$this->renderLinkbar($view, $task, $input, $config);
}
}
示例5: preRender
/**
* Echoes any HTML to show before the view template
*
* @param string $view The current view
* @param string $task The current task
* @param FOFInput $input The input array (request parameters)
* @param array $config The view configuration array
*
* @return void
*/
public function preRender($view, $task, $input, $config = array())
{
$format = $input->getCmd('format', 'html');
if (empty($format)) {
$format = 'html';
}
if ($format != 'html') {
return;
}
$platform = FOFPlatform::getInstance();
if ($platform->isCli()) {
return;
}
// Wrap output in various classes
$version = new JVersion();
$versionParts = explode('.', $version->RELEASE);
$minorVersion = str_replace('.', '', $version->RELEASE);
$majorVersion = array_shift($versionParts);
if ($platform->isBackend()) {
$area = $platform->isBackend() ? 'admin' : 'site';
$option = $input->getCmd('option', '');
$view = $input->getCmd('view', '');
$layout = $input->getCmd('layout', '');
$task = $input->getCmd('task', '');
$classes = array('joomla-version-' . $majorVersion, 'joomla-version-' . $minorVersion, $area, $option, 'view-' . $view, 'layout-' . $layout, 'task-' . $task);
} elseif ($platform->isFrontend()) {
// @TODO: Remove the frontend Joomla! version classes in FOF 3
$classes = array('joomla-version-' . $majorVersion, 'joomla-version-' . $minorVersion);
}
echo '<div id="akeeba-renderjoomla" class="' . implode($classes, ' ') . "\">\n";
// Render submenu and toolbar (only if asked to)
if ($input->getBool('render_toolbar', true)) {
$this->renderButtons($view, $task, $input, $config);
$this->renderLinkbar($view, $task, $input, $config);
}
}