Skip to content

Commit

Permalink
Remove language from constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
gvollbach committed Dec 12, 2023
1 parent 017388b commit b122fd7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Services/Badge/classes/Modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(
) {
$this->sign_file = Closure::fromCallable($sign_file);
global $DIC;
$this->badge_image_service = new ilBadgeImage($DIC->resourceStorage(), $DIC->upload(), $DIC->ui()->mainTemplate(), $DIC->language());
$this->badge_image_service = new ilBadgeImage($DIC->resourceStorage(), $DIC->upload(), $DIC->ui()->mainTemplate());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Services/Badge/classes/Tile.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class_exists(ilDateTime::class); // Ensure ilDateTime is loaded as IL_CAL_UNIX i
}
$this->format_date = $format_date;
global $DIC;
$this->badge_image_service = new ilBadgeImage($DIC->resourceStorage(), $DIC->upload(), $DIC->ui()->mainTemplate(), $DIC->language());
$this->badge_image_service = new ilBadgeImage($DIC->resourceStorage(), $DIC->upload(), $DIC->ui()->mainTemplate());
}

/**
Expand Down
4 changes: 1 addition & 3 deletions Services/Badge/classes/class.ilBadgeImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ class ilBadgeImage
private ?Services $resource_storage;
private ?FileUpload $upload_service;
private ?ilGlobalTemplateInterface $main_template;
private ?\ilLanguage $lng;

public function __construct(Services $resourceStorage, FileUpload $uploadService, ilGlobalTemplateInterface $main_template, \ilLanguage $lng)
public function __construct(Services $resourceStorage, FileUpload $uploadService, ilGlobalTemplateInterface $main_template)
{
$this->resource_storage = $resourceStorage;
$this->upload_service = $uploadService;
$this->main_template = $main_template;
$this->lng = $lng;
}

public function getImageFromBadge(ilBadge $badge) : string
Expand Down
2 changes: 1 addition & 1 deletion Services/Badge/classes/class.ilBadgeManagementGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function __construct(
);

$this->session_repo = new ilBadgeManagementSessionRepository();
$this->badge_image_service = new ilBadgeImage($DIC->resourceStorage(), $DIC->upload(), $DIC->ui()->mainTemplate(), $DIC->language());
$this->badge_image_service = new ilBadgeImage($DIC->resourceStorage(), $DIC->upload(), $DIC->ui()->mainTemplate());
}

public function executeCommand(): void
Expand Down
2 changes: 1 addition & 1 deletion Services/Badge/classes/class.ilBadgeTableGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __construct(
$this->tile = new Tile($DIC);
$ilCtrl = $DIC->ctrl();
$lng = $DIC->language();
$this->badge_image_service = new ilBadgeImage($DIC->resourceStorage(), $DIC->upload(), $DIC->ui()->mainTemplate(), $DIC->language());
$this->badge_image_service = new ilBadgeImage($DIC->resourceStorage(), $DIC->upload(), $DIC->ui()->mainTemplate());

$this->setId("bdgbdg");
$this->parent_type = ilObject::_lookupType($a_parent_obj_id);
Expand Down

0 comments on commit b122fd7

Please sign in to comment.