mambax7/gwiki

View on GitHub
admin/index.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

/**
 * admin/index.php - index, splash and config checks
 *
 * @copyright  Copyright © 2013 geekwright, LLC. All rights reserved.
 * @license    gwiki/docs/license.txt  GNU General Public License (GPL)
 * @since      1.0
 * @author     Richard Griffith <richard@geekwright.com>
 * @package    gwiki
 */

use Xmf\Module\Admin;
use Xmf\Request;
use Xmf\Yaml;
use XoopsModules\Gwiki\{
    Common,
    Common\TestdataButtons,
    Helper,
    Utility
};

/** @var Admin $adminObject */
/** @var Helper $helper */
/** @var Utility $utility */

require_once __DIR__ . '/header.php';

$adminObject->displayNavigation(basename(__FILE__));
$welcome = _AD_GW_ADMENU_WELCOME;
$adminObject->addInfoBox($welcome);
$adminObject->addInfoBoxLine(sprintf(_AD_GW_ADMENU_MESSAGE, '', '', 'information'), '');

//------------- Test Data Buttons ----------------------------
if ($helper->getConfig('displaySampleButton')) {
    TestdataButtons::loadButtonConfig($adminObject);
    $adminObject->displayButton('left', '');
}
$op = Request::getString('op', 0, 'GET');
switch ($op) {
    case 'hide_buttons':
        TestdataButtons::hideButtons();
        break;
    case 'show_buttons':
        TestdataButtons::showButtons();
        break;
}
//------------- End Test Data Buttons ----------------------------


$adminObject->displayIndex();

require_once __DIR__ . '/footer.php';