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());
184 return $a->getPosition() >
$b->getPosition();
An exception for terminatinating execution or to throw for unit testing.
Class AbstractBaseCollector.
Class TypeInformationCollection.
getItemsForUIRepresentation()
applyTypeInformation(isToolItem $item)
prepareItemsForUIRepresentation()
getSingleItem(IdentificationInterface $identification)
cleanupItemsForUIRepresentation()
filterItemsByVisibilty(bool $async_only=false)
sortItemsForUIRepresentation()
__construct(array $providers, ItemInformation $information=null)
MainToolCollector constructor.
$type_information_collection
Interface IdentificationInterface.
setTypeInformation(TypeInformation $information)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples