Register style can be skipped when already registered

This commit is contained in:
Antoine Lamirault committed 2021-02-22 20:47:32 +01:00
1 parent 40bdc9c0f1
commit f109432880
9 files changed
+84 -31

No files matched your search

+22
View File
@@ -84,6 +84,9 @@ class Style
/** @var bool */
private $hasSetFormat = false;
/** @var bool */
private $isRegistered = false;
/**
* @return int|null
*/
@@ -463,4 +466,23 @@ class Style
{
return $this->hasSetFormat;
}
public function setRegistered(bool $isRegistered = true) : void
{
$this->isRegistered = $isRegistered;
}
/**
* @return bool
*/
public function isRegistered() : bool
{
return $this->isRegistered;
}
public function register(int $id) : void
{
$this->setId($id);
$this->isRegistered = true;
}
}