From b1f2d648a512cf5632c189709b601be5ce2d6e40 Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Tue, 24 Sep 2024 17:53:37 +0530 Subject: [PATCH] Update PluginInstallTask.php --- includes/Tasks/PluginInstallTask.php | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/includes/Tasks/PluginInstallTask.php b/includes/Tasks/PluginInstallTask.php index 88e50e5..dc91276 100644 --- a/includes/Tasks/PluginInstallTask.php +++ b/includes/Tasks/PluginInstallTask.php @@ -36,6 +36,20 @@ class PluginInstallTask extends Task { */ private $retries; + /** + * Boolean if the given plugin is a entitlement. + * + * @var int + */ + private $is_entitlement; + + /** + * Meta information about a plugin, useful for entitlements. + * + * @var int + */ + private $meta; + /** * PluginInstallTask constructor * @@ -43,12 +57,16 @@ class PluginInstallTask extends Task { * @param boolean $activate A value of true activates the plugin. * @param int $priority Priority of the task, higher the number higher the priority. * @param int $retries The number of times the Task has been retried + * @param boolean $is_entitlement If the given plugin is a entitlement + * @param object $meta Meta information about a plugin */ - public function __construct( $slug, $activate, $priority = 0, $retries = 0 ) { - $this->slug = $slug; - $this->activate = $activate; - $this->priority = $priority; - $this->retries = $retries; + public function __construct( $slug, $activate, $priority = 0, $retries = 0, $is_entitlement = false, $meta = array() ) { + $this->slug = $slug; + $this->activate = $activate; + $this->priority = $priority; + $this->retries = $retries; + $this->is_entitlement = $is_entitlement; + $this->meta = $meta; } /**