ILIAS  release_7 Revision v7.30-3-g800a261c036
PluginIdentificationProvider.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
21
25
32{
36 protected $plugin_id = "";
37
45 public function __construct(
47 string $plugin_id,
50 ) {
52 $this->plugin_id = $plugin_id;
53 }
54
58 public function identifier(string $identifier_string) : IdentificationInterface
59 {
60 if (isset(self::$instances[$identifier_string])) {
61 return self::$instances[$identifier_string];
62 }
63
64 $identification = new PluginIdentification(
65 $this->plugin_id,
66 $identifier_string,
67 $this->class_name,
68 $this->serializer,
69 $this->provider->getProviderNameForPresentation()
70 );
71 $this->map->addToMap($identification);
72
73 return self::$instances[$identifier_string] = $identification;
74 }
75}
An exception for terminatinating execution or to throw for unit testing.
identifier(string $identifier_string)
IdentificationInterface use this CoreIdentification to put into your GlobalScreen-elements.
__construct(Provider $provider, string $plugin_id, SerializerInterface $serializer, IdentificationMap $map)
PluginIdentificationProvider constructor.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc