Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
ilias 6 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodor Truffer committed Mar 2, 2021
1 parent e99e85e commit 8c144bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use ilUtil;
use ilPropertyFormGUI;
use srag\CustomInputGUIs\OneDrive\Waiter\Waiter;
use ilGlobalPageTemplate;

/**
* Class srChunkedDirectFileUploadInputGUI
Expand Down Expand Up @@ -91,7 +92,11 @@ public function __construct(ilPropertyFormGUI $ilPropertyFormGUI, ilPlugin $plug
$this->submit_cmd = $submit_cmd;
}

public static function loadJavaScript(ilTemplate $a_tpl, bool $force = false)
/**
* @param ilTemplate|ilGlobalPageTemplate $a_tpl
* @param bool $force
*/
public static function loadJavaScript($a_tpl, bool $force = false)
{
if (!self::$js_loaded || $force) {
Waiter::init(Waiter::TYPE_PERCENTAGE, $a_tpl);
Expand Down
6 changes: 3 additions & 3 deletions vendor/srag/custominputguis/src/Waiter/Waiter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace srag\CustomInputGUIs\OneDrive\Waiter;

use ilTemplate;
use srag\DIC\OneDrive\DICTrait;
use ilGlobalPageTemplate;

/**
* Class Waiter
Expand Down Expand Up @@ -42,9 +42,9 @@ private function __construct()

/**
* @param string $type
* @param ilTemplate|null $tpl
* @param ilGlobalPageTemplate|ilTemplate|null $tpl
*/
public static final function init(string $type, /*?*/ ilTemplate $tpl = null)/*: void*/
public static final function init(string $type, /*?ilGlobalPageTemplate*/ $tpl = null)/*: void*/
{
$tpl = $tpl ?? self::dic()->ui()->mainTemplate();

Expand Down

0 comments on commit 8c144bf

Please sign in to comment.