Source of file CookieConsentCheckBoxField.php
Size: 0,836 Bytes - Last Modified: 2021-12-24T06:33:48+00:00
/var/www/docs.ssmods.com/process/src/src/Forms/CookieConsentCheckBoxField.php
123456789101112131415161718192021222324252627282930313233343536373839404142 | <?php namespace Broarm\CookieConsent\Forms; use Broarm\CookieConsent\Model\CookieGroup; use SilverStripe\Forms\CheckboxField; /** * Class CookieConsentCheckBoxField * * @author Bram de Leeuw */ class CookieConsentCheckBoxField extends CheckboxField { /** * @var CookieGroup */ protected $cookieGroup; public function __construct(CookieGroup $cookieGroup) { $this->cookieGroup = $cookieGroup; parent::__construct( $cookieGroup->ConfigName, $cookieGroup->Title, $cookieGroup->isRequired() ); $this->setDisabled($cookieGroup->isRequired()); } public function getContent() { return $this->cookieGroup->dbObject('Content'); } public function getCookieGroup() { return $this->cookieGroup; } } |