ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilUserProfilePictureStakeholder.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 {
28  private int $default_owner;
29 
30  public function __construct()
31  {
32  global $DIC;
33  $this->default_owner = $DIC->isDependencyAvailable('user')
34  ? $DIC->user()->getId()
35  : (defined('SYSTEM_USER_ID') ? (int) SYSTEM_USER_ID : 6);
36  }
37 
38  public function setOwner(int $user_id_of_owner): void
39  {
40  $this->default_owner = $user_id_of_owner;
41  }
42 
43  public function getId(): string
44  {
45  return 'usr_picture';
46  }
47 
48  public function getOwnerOfNewResources(): int
49  {
50  return $this->default_owner;
51  }
52 }
__construct()
Constructor must not have any parameters.
const SYSTEM_USER_ID
This file contains constants for PHPStan analyis, see: https://phpstan.org/config-reference#constants...
Definition: constants.php:26
global $DIC
Definition: feed.php:28