ConditionalDivider
extends ConditionalComponent
in package
Conditional properties for divider components.
Allows divider-specific properties like stroke to change based on conditions.
Tags
Table of Contents
Properties
- $anchor : string|null
- The anchor configuration.
- $conditions : array<int, Condition>
- The conditions that must be met.
- $hidden : bool|null
- Whether the component is hidden.
- $layout : string|null
- The layout reference.
- $style : string|null
- The style reference.
- $stroke : array<string, mixed>|null
- The stroke style configuration.
Methods
- addCondition() : $this
- Add a condition.
- hasConditions() : bool
- Check if any conditions have been set.
- hiddenOnCompact() : self
- Create a conditional that hides on compact width.
- jsonSerialize() : array<string, mixed>
- {@inheritdoc}
- setAnchor() : $this
- Set the anchor.
- setConditions() : $this
- Set multiple conditions.
- setHidden() : $this
- Set whether the component is hidden.
- setLayout() : $this
- Set the layout reference.
- setStroke() : $this
- Set the stroke style.
- setStyle() : $this
- Set the style reference.
- visibleOnRegular() : self
- Create a conditional that shows only on regular width.
Properties
$anchor
The anchor configuration.
protected
string|null
$anchor
= null
$conditions
The conditions that must be met.
protected
array<int, Condition>
$conditions
= []
$hidden
Whether the component is hidden.
protected
bool|null
$hidden
= null
$layout
The layout reference.
protected
string|null
$layout
= null
$style
The style reference.
protected
string|null
$style
= null
$stroke
The stroke style configuration.
private
array<string, mixed>|null
$stroke
= null
Methods
addCondition()
Add a condition.
public
addCondition(Condition $condition) : $this
Parameters
- $condition : Condition
-
The condition to add.
Return values
$thishasConditions()
Check if any conditions have been set.
public
hasConditions() : bool
Return values
bool —True if conditions exist.
hiddenOnCompact()
Create a conditional that hides on compact width.
public
static hiddenOnCompact() : self
Return values
self —A new instance.
jsonSerialize()
{@inheritdoc}
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>setAnchor()
Set the anchor.
public
setAnchor(string $anchor) : $this
Parameters
- $anchor : string
-
The anchor reference.
Return values
$thissetConditions()
Set multiple conditions.
public
setConditions(array<int, Condition> $conditions) : $this
Parameters
- $conditions : array<int, Condition>
-
The conditions.
Return values
$thissetHidden()
Set whether the component is hidden.
public
setHidden(bool $hidden) : $this
Parameters
- $hidden : bool
-
Whether hidden.
Return values
$thissetLayout()
Set the layout reference.
public
setLayout(string $layout) : $this
Parameters
- $layout : string
-
The layout name.
Return values
$thissetStroke()
Set the stroke style.
public
setStroke(array<string, mixed> $stroke) : $this
Parameters
- $stroke : array<string, mixed>
-
The stroke configuration.
Return values
$thissetStyle()
Set the style reference.
public
setStyle(string $style) : $this
Parameters
- $style : string
-
The style name.
Return values
$thisvisibleOnRegular()
Create a conditional that shows only on regular width.
public
static visibleOnRegular() : self
Return values
self —A new instance.