Register style can be skipped when already registered
This commit is contained in:
1 parent
40bdc9c0f1
commit
f109432880
9 files changed
+84
-31
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user