|
Server : LiteSpeed System : Linux quebec.us.hostns.io 5.14.0-687.42.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 27 11:55:12 EDT 2026 x86_64 User : gazetufm ( 1431) PHP Version : 8.1.35 Disable Function : NONE Directory : /home2/gazetufm/dumoshi.com/wp-content/plugins/wpforms-lite/src/Admin/Dashboard/ | |
|
Path: //home2/gazetufm/dumoshi.com/wp-content/plugins/wpforms-lite/src/Admin/Dashboard/WidgetState.php
Size: 1.48 KB
Permissions: 0644
<?php
namespace WPForms\Admin\Dashboard;
/**
* Dashboard widget state value object.
*
* @since 2.0.2
*/
class WidgetState {
/**
* Whether the widget should render.
*
* @since 2.0.2
*
* @var bool
*/
private $visible;
/**
* Template variant: 'data', 'connect', 'education', 'install'.
*
* @since 2.0.2
*
* @var string
*/
private $variant;
/**
* Dynamic sort position. Null means use the widget class ORDER constant.
*
* @since 2.0.2
*
* @var int|null
*/
private $order_override;
/**
* Constructor.
*
* @since 2.0.2
*
* @param bool $visible Whether the widget should render.
* @param string $variant Template variant.
* @param int|null $order_override Dynamic sort position.
*/
public function __construct( bool $visible, string $variant = '', ?int $order_override = null ) {
$this->visible = $visible;
$this->variant = $variant;
$this->order_override = $order_override;
}
/**
* Whether the widget should render.
*
* @since 2.0.2
*
* @return bool
*/
public function is_visible(): bool {
return $this->visible;
}
/**
* Get the template variant.
*
* @since 2.0.2
*
* @return string
*/
public function get_variant(): string {
return $this->variant;
}
/**
* Get the dynamic sort position, or null to use the widget ORDER constant.
*
* @since 2.0.2
*
* @return int|null
*/
public function get_order_override(): ?int {
return $this->order_override;
}
}