Skip to content

Commit

Permalink
[FIX] error on pin page
Browse files Browse the repository at this point in the history
  • Loading branch information
chfsx committed Jun 12, 2024
1 parent 2ca713b commit cfa7a82
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions src/Context/xlvoILIAS.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,40 @@
namespace LiveVoting\Context;

use ilException;
use ilLiveVotingPlugin;
use LiveVoting\Utils\LiveVotingTrait;
use srag\DIC\LiveVoting\DICTrait;

/**
* Class xlvoILIAS
*
* @package LiveVoting\Context
* @author nschaefli
*/
class xlvoILIAS
class xlvoILIAS extends \ILIAS
{

use DICTrait;
use LiveVotingTrait;
const PLUGIN_CLASS_NAME = ilLiveVotingPlugin::class;


private \ilSetting $settings;

public function __construct()
{

global $DIC;
parent::__construct();
$this->settings = $DIC->settings();
}



/**
* @param $key
*
* @return mixed
*/
public function getSetting($key)
public function getSetting(string $a_keyword, ?string $a_default_value = null) : ?string
{
return self::dic()->settings()->get($key);
return $this->settings->get($a_keyword, $a_default_value);
}



/**
* wrapper for downward compability
*
* @throws ilException
*/
public function raiseError($a_msg, $a_err_obj)
public function raiseError(string $a_msg, int $a_err_obj) : void
{
throw new ilException($a_msg);
}
Expand Down

0 comments on commit cfa7a82

Please sign in to comment.