| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/nice/libraries/regularlabs/layouts/regularlabs/buttons/ |
Upload File : |
<?php
/**
* @package Regular Labs Library
* @version 25.9.9174
*
* @author Peter van Westen <info@regularlabs.com>
* @link https://regularlabs.com
* @copyright Copyright © 2025 Regular Labs All Rights Reserved
* @license GNU General Public License version 2 or later
*/
defined('_JEXEC') or die;
/**
* @var object $displayData
*/
$button = $displayData;
if (empty($button->name))
{
return;
}
$is_modal = $button->modal ?? false;
$class = 'btn';
$class .= ! empty($button->class) ? ' ' . $button->class : ' btn-secondary';
$class .= $is_modal ? ' modal-button' : null;
$onclick = ! empty($button->onclick) ? ' onclick="' . str_replace('"', '"', $button->onclick) . '"' : '';
$title = ! empty($button->title) ? $button->title : ($button->text ?? '');
$icon = ! empty($button->icon) ? $button->icon : $button->name;
$href = $is_modal
? 'data-bs-target="#' . strtolower($button->name) . '_modal"'
: 'href="' . ($button->link ?? '#') . '"';
?>
<button type="button" <?php echo $href; ?>
class="<?php echo $class; ?>" <?php echo $button->modal ? 'data-bs-toggle="modal"' : '' ?>
title="<?php echo $title; ?>" <?php echo $onclick; ?>>
<span class="icon-<?php echo $icon; ?>" aria-hidden="true"></span>
<?php echo $button->text ?? ''; ?>
</button>