19declare(strict_types=1);
61 $tool->setCreationPrevented(
true);
62 $this->type_information_collection->add($tool);
65 $tool->setCreationPrevented(
true);
66 $this->type_information_collection->add($tool);
72 $called_contexts =
$DIC->globalScreen()->tool()->context()->stack();
77 $context_collection =
$provider->isInterestedInContexts();
78 if ($context_collection->hasMatch($called_contexts)) {
79 $tools_to_merge[] =
$provider->getToolsForContextStack($called_contexts);
82 $this->tools = array_merge([], ...$tools_to_merge);
92 foreach ($this->tools as $tool) {
93 if ($tool->getProviderIdentification()->serialize() === $identification->serialize()) {
97 return new Tool($identification);
102 array_walk($this->tools,
function (
isToolItem $tool):
void {
124 return $this->tools !== [];
153 $type = $item::class;
155 return $this->type_information_collection->get($type);
Class AbstractBaseCollector.
Class TypeInformationCollection.
getItemsForUIRepresentation()
__construct(private array $providers, private ?ItemInformation $information=null)
MainToolCollector constructor.
applyTypeInformation(isToolItem $item)
prepareItemsForUIRepresentation()
getSingleItem(IdentificationInterface $identification)
cleanupItemsForUIRepresentation()
filterItemsByVisibilty(bool $async_only=false)
sortItemsForUIRepresentation()
TypeInformationCollection $type_information_collection
Interface IdentificationInterface.
setTypeInformation(TypeInformation $information)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples