58 $tool->setCreationPrevented(
true);
59 $this->type_information_collection->add($tool);
62 $tool->setCreationPrevented(
true);
63 $this->type_information_collection->add($tool);
72 $called_contexts = $DIC->globalScreen()->tool()->context()->stack();
76 foreach ($this->providers as $provider) {
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);
93 foreach ($this->tools as $tool) {
94 if ($tool->getProviderIdentification()->serialize() === $identification->serialize()) {
98 return new Tool($identification);
104 array_walk($this->tools,
function (
isToolItem $tool) {
134 return count($this->tools) > 0;
161 $type = get_class($item);
163 return $this->type_information_collection->get(
$type);
173 return ($tool->isAvailable() && $tool->isVisible());
Interface IdentificationInterface.
Class AbstractBaseCollector.
setTypeInformation(TypeInformation $information)
$type_information_collection
getPosition()
Return the default position for installation, this will be overridden by the configuration later...
Class TypeInformationCollection.
cleanupItemsForUIRepresentation()
__construct(array $providers, ItemInformation $information=null)
MainToolCollector constructor.
filterItemsByVisibilty(bool $async_only=false)
getSingleItem(IdentificationInterface $identification)
sortItemsForUIRepresentation()
applyTypeInformation(isToolItem $item)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
prepareItemsForUIRepresentation()
getItemsForUIRepresentation()