Files
iTop/sources/Application/UI/Base/Component/Input/Toggler.php
Stephen Abello e7b493dafa N°2039 - Rework view all notifications page (#617)
* N°2039 - Rework view all notifications page

* N°2039 - Replace modals with toasts

* N°2039 - Add bulk mode to view all notifications page

* Apply suggestions from code review

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Apply suggestions from code review

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Apply suggestions from code review

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Apply suggestions from code review

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Apply suggestions from code review

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update css/backoffice/pages/_notifications.scss

* Update dictionaries/ui/application/newsroom/fr.dictionary.itop.newsroom.php

* Apply suggestions from code review

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Add since in phpdoc

* Change newsroom empty notification illustration

* N°2039 - Refactor code to factorize logic

---------

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
2024-02-28 09:22:39 +01:00

37 lines
845 B
PHP

<?php
/**
* @copyright Copyright (C) 2010-2024 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Application\UI\Base\Component\Input;
/**
* @package Combodo\iTop\Application\UI\Base\Component\Input
* @since 3.2.0
*/
class Toggler extends Input {
// Overloaded constants
public const BLOCK_CODE = 'ibo-toggler';
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/input/input-toggler';
public const DEFAULT_JS_ON_READY_TEMPLATE_REL_PATH = 'base/components/input/input-toggler';
public function __construct(?string $sId = null)
{
parent::__construct($sId);
$this->SetType('checkbox');
}
public function SetIsToggled(bool $bIsToggled): static
{
return $this->SetIsChecked($bIsToggled);
}
public function IsToggled(): bool
{
return $this->IsChecked();
}
}