Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
priority = 60;
$this->enabled = class_exists('AkeebaStrapper');
}
/**
* 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 "
\n";
// Wrap output in an akeeba-bootstrap class div
echo "
\n";
echo "
\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);
}
}
/**
* Echoes any HTML to show after 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 postRender($view, $task, $input, $config = array())
{
$format = $input->getCmd('format', 'html');
if ($format != 'html' || FOFPlatform::getInstance()->isCli())
{
return;
}
if (!FOFPlatform::getInstance()->isCli() && version_compare(JVERSION, '3.0', 'ge'))
{
$sidebarEntries = JHtmlSidebar::getEntries();
if (!empty($sidebarEntries))
{
echo '
';
}
}
echo "
\n"; // Closes row-fluid div
echo "
\n"; // Closes akeeba-bootstrap div
echo "\n"; // Closes joomla-version div
}
/**
* Loads the validation script for an edit form
*
* @param FOFForm &$form The form we are rendering
*
* @return void
*/
protected function loadValidationScript(FOFForm &$form)
{
$message = $form->getView()->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));
$js = <<getDocument();
if ($document instanceof JDocument)
{
$document->addScriptDeclaration($js);
}
}
/**
* Renders the submenu (link bar)
*
* @param string $view The active view name
* @param string $task The current task
* @param FOFInput $input The input object
* @param array $config Extra configuration variables for the toolbar
*
* @return void
*/
protected function renderLinkbar($view, $task, $input, $config = array())
{
$style = 'classic';
if (array_key_exists('linkbar_style', $config))
{
$style = $config['linkbar_style'];
}
if (!version_compare(JVERSION, '3.0', 'ge'))
{
$style = 'classic';
}
switch ($style)
{
case 'joomla':
$this->renderLinkbar_joomla($view, $task, $input);
break;
case 'classic':
default:
$this->renderLinkbar_classic($view, $task, $input);
break;
}
}
/**
* Renders the submenu (link bar) in FOF's classic style, using a Bootstrapped
* tab bar.
*
* @param string $view The active view name
* @param string $task The current task
* @param FOFInput $input The input object
* @param array $config Extra configuration variables for the toolbar
*
* @return void
*/
protected function renderLinkbar_classic($view, $task, $input, $config = array())
{
if (FOFPlatform::getInstance()->isCli())
{
return;
}
// Do not render a submenu unless we are in the the admin area
$toolbar = FOFToolbar::getAnInstance($input->getCmd('option', 'com_foobar'), $config);
$renderFrontendSubmenu = $toolbar->getRenderFrontendSubmenu();
if (!FOFPlatform::getInstance()->isBackend() && !$renderFrontendSubmenu)
{
return;
}
$links = $toolbar->getLinks();
if (!empty($links))
{
echo "
\n";
foreach ($links as $link)
{
$dropdown = false;
if (array_key_exists('dropdown', $link))
{
$dropdown = $link['dropdown'];
}
if ($dropdown)
{
echo "
\n";
}
}
/**
* Renders the submenu (link bar) using Joomla!'s style. On Joomla! 2.5 this
* is a list of bar separated links, on Joomla! 3 it's a sidebar at the
* left-hand side of the page.
*
* @param string $view The active view name
* @param string $task The current task
* @param FOFInput $input The input object
* @param array $config Extra configuration variables for the toolbar
*
* @return void
*/
protected function renderLinkbar_joomla($view, $task, $input, $config = array())
{
// On command line don't do anything
if (FOFPlatform::getInstance()->isCli())
{
return;
}
// Do not render a submenu unless we are in the the admin area
$toolbar = FOFToolbar::getAnInstance($input->getCmd('option', 'com_foobar'), $config);
$renderFrontendSubmenu = $toolbar->getRenderFrontendSubmenu();
if (!FOFPlatform::getInstance()->isBackend() && !$renderFrontendSubmenu)
{
return;
}
$this->renderLinkbarItems($toolbar);
}
/**
* do the rendering job for the linkbar
*
* @param FOFToolbar $toolbar A toolbar object
*
* @return void
*/
protected function renderLinkbarItems($toolbar)
{
$links = $toolbar->getLinks();
if (!empty($links))
{
foreach ($links as $link)
{
JHtmlSidebar::addEntry($link['name'], $link['link'], $link['active']);
$dropdown = false;
if (array_key_exists('dropdown', $link))
{
$dropdown = $link['dropdown'];
}
if ($dropdown)
{
foreach ($link['items'] as $item)
{
JHtmlSidebar::addEntry('– ' . $item['name'], $item['link'], $item['active']);
}
}
}
}
}
/**
* Renders the toolbar buttons
*
* @param string $view The active view name
* @param string $task The current task
* @param FOFInput $input The input object
* @param array $config Extra configuration variables for the toolbar
*
* @return void
*/
protected function renderButtons($view, $task, $input, $config = array())
{
if (FOFPlatform::getInstance()->isCli())
{
return;
}
// Do not render buttons unless we are in the the frontend area and we are asked to do so
$toolbar = FOFToolbar::getAnInstance($input->getCmd('option', 'com_foobar'), $config);
$renderFrontendButtons = $toolbar->getRenderFrontendButtons();
// Load main backend language, in order to display toolbar strings
// (JTOOLBAR_BACK, JTOOLBAR_PUBLISH etc etc)
FOFPlatform::getInstance()->loadTranslations('joomla');
if (FOFPlatform::getInstance()->isBackend() || !$renderFrontendButtons)
{
return;
}
$bar = JToolBar::getInstance('toolbar');
$items = $bar->getItems();
$substitutions = array(
'icon-32-new' => 'icon-plus',
'icon-32-publish' => 'icon-eye-open',
'icon-32-unpublish' => 'icon-eye-close',
'icon-32-delete' => 'icon-trash',
'icon-32-edit' => 'icon-edit',
'icon-32-copy' => 'icon-th-large',
'icon-32-cancel' => 'icon-remove',
'icon-32-back' => 'icon-circle-arrow-left',
'icon-32-apply' => 'icon-ok',
'icon-32-save' => 'icon-hdd',
'icon-32-save-new' => 'icon-repeat',
);
if(isset(JFactory::getApplication()->JComponentTitle))
{
$title = JFactory::getApplication()->JComponentTitle;
}
else
{
$title = '';
}
$html = array();
$actions = array();
// For BC we have to use the same id we're using inside other renderers (FOFHeaderHolder)
//$html[] = '