3declare(strict_types=1);
69 $tool->setCreationPrevented(
true);
70 $this->type_information_collection->add($tool);
73 $tool->setCreationPrevented(
true);
74 $this->type_information_collection->add($tool);
82 $called_contexts =
$DIC->globalScreen()->tool()->context()->stack();
87 $context_collection =
$provider->isInterestedInContexts();
88 if ($context_collection->hasMatch($called_contexts)) {
89 $tools_to_merge[] =
$provider->getToolsForContextStack($called_contexts);
92 $this->tools = array_merge([], ...$tools_to_merge);
102 foreach ($this->tools as $tool) {
103 if ($tool->getProviderIdentification()->serialize() === $identification->serialize()) {
107 return new Tool($identification);
112 array_walk($this->tools,
function (
isToolItem $tool):
void {
134 return count($this->tools) > 0;
163 $type = get_class($item);
165 return $this->type_information_collection->get(
$type);
170 return static function (
isToolItem $tool):
bool {
171 return ($tool->isAvailable() && $tool->isVisible());
178 return $a->getPosition() -
$b->getPosition();
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.
TypeInformationCollection $type_information_collection
ItemInformation $information
Interface IdentificationInterface.
setTypeInformation(TypeInformation $information)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples