'help',
Security::CTRL_TOKEN => SecureCsrf::generate('help'),
'basic' => '',
'open_section' => $helpOpenSection,
));
return SnapURL::getCurrentUrl(false, true) . '?' . http_build_query($data);
}
/**
* Help link
*
* @param string $section Help section
* @param string $linkLabel Link label
* @param bool $echo Echo or return
*
* @return string
*/
public static function helpLink($section, $linkLabel = 'Help', $echo = true)
{
ob_start();
$help_url = self::getHelpLink($section);
DUPX_U_Html::getLightBoxIframe($linkLabel, 'HELP', $help_url);
if ($echo) {
ob_end_flush();
return '';
} else {
return ob_get_clean();
}
}
/**
* Help lock link
*
* @return void
*/
public static function helpLockLink()
{
if (DUPX_ArchiveConfig::getInstance()->secure_on) {
self::helpLink('secure', '');
} else {
self::helpLink('secure', '');
}
}
/**
* Help icon link
*
* @param string $section Help section
*
* @return void
*/
public static function helpIconLink($section)
{
self::helpLink($section, '');
}
/**
* Get badge class attr val from status
*
* @param string $status Status
*
* @return string html class attribute
*/
public static function getBadgeClassFromCheckStatus($status)
{
switch ($status) {
case 'Pass':
return 'status-badge.pass';
case 'Fail':
return 'status-badge.fail';
case 'Warn':
return 'status-badge.warn';
default:
Log::error(sprintf("The arcCheck var has the illegal value %s in switch case", Log::v2str($status)));
return '';
}
}
}