| Server IP : 172.67.191.97 / Your IP : 104.23.197.209 Web Server : Apache/2.4.63 (Ubuntu) System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.4.5 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/fcs/administrator/components/com_dpcalendar/src/Router/ |
Upload File : |
<?php
/**
* @package DPCalendar
* @copyright Copyright (C) 2018 Digital Peak GmbH. <https://www.digital-peak.com>
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
*/
namespace DigitalPeak\Component\DPCalendar\Administrator\Router;
use DigitalPeak\Component\DPCalendar\Site\Helper\RouteHelper;
use Joomla\CMS\Router\Route;
class Router
{
public function route(string $url, ?bool $xhtml = true): string
{
return Route::_($url, $xhtml ?? true);
}
public function getCalendarRoute(string $calId): string
{
return Route::_(RouteHelper::getCalendarRoute($calId));
}
public function getCalendarIcalRoute(string $calId, ?string $token = ''): string
{
return RouteHelper::getCalendarIcalRoute($calId, $token);
}
/**
* @param string|int $id
*/
public static function getEventRoute($id, ?string $calId = '', bool $full = false, bool $autoRoute = true, ?int $defaultItemId = 0): string
{
return RouteHelper::getEventRoute($id, $calId, $full, $autoRoute, $defaultItemId);
}
public function getEventFormRoute(?string $id, ?string $return = null, ?string $append = null, ?bool $xhtml = true): string
{
return Route::_(RouteHelper::getFormRoute($id, $return, $append), \is_bool($xhtml) ? $xhtml : true);
}
public function getEventDeleteRoute(string $id, ?string $return = null): string
{
return Route::_('index.php?option=com_dpcalendar&task=event.delete&e_id=' . $id . '&return=' . base64_encode($return !== null && $return !== '' && $return !== '0' ? $return : ''));
}
public function getLocationRoute(\stdClass $location): string
{
return RouteHelper::getLocationRoute($location);
}
public function getLocationFormRoute(?string $id, ?string $return = null): string
{
return RouteHelper::getLocationFormRoute($id, $return);
}
public static function getBookingRoute(\stdClass $booking, ?bool $full = false): string
{
return RouteHelper::getBookingRoute($booking, $full);
}
public static function getBookingFormRoute(\stdClass $booking, ?string $return = null): string
{
return RouteHelper::getBookingFormRoute($booking, $return);
}
public function getBookingFormRouteFromEvent(\stdClass $event, ?string $return = null, ?bool $autoRoute = true, ?int $defaultItemId = 0): string
{
return RouteHelper::getBookingFormRouteFromEvent($event, $return, $autoRoute, $defaultItemId);
}
public static function getTicketRoute(\stdClass $ticket, ?bool $full = false): string
{
return RouteHelper::getTicketRoute($ticket, $full);
}
public static function getTicketFormRoute(string $ticketId, ?string $return = null): string
{
return RouteHelper::getTicketFormRoute($ticketId, $return);
}
public static function getTicketDeleteRoute(string $ticketId, ?string $return = null): string
{
return RouteHelper::getTicketDeleteRoute($ticketId, $return);
}
}