Resolves which ui components should be disabled on which view

@param \Antares\UI\UIComponents\Adapter\AbstractTemplate $component
@return boolean|void
504785
protected function resolveDisabledUIComponent(AbstractTemplate $component, $keyname = 'ui-components.disabled')
    {
        $disabled = $component->getDisabled();



        if (empty($disabled)) {
            return false;
        }
        $classname = get_class($component);
        view()->composer($disabled, function() use($keyname, $classname) {
            $hasWidgets = Registry::isRegistered($keyname);
            if (!$hasWidgets) {
                $collection = new Collection([$classname]);
            } else {
                $collection = Registry::get($keyname);
                $collection->push($classname);
            }
            Registry::set($keyname, $collection);
        });
        return;
    }
976634
private function isAutoMappingDisabled(string $templateName): bool
    {
        if (isset($this->mapping['mandatory'][$templateName])) {
            return false;
        }

        return !$this->environment->getConfig()->get('templates.auto_mapping', true);
    }
228660
public function findByComponentAndView($component, $view)
    {
        $menus = $this->findAll();

        $matchedMenus = [];
        /** @var Menu $menu */
        foreach ($menus as $menu) {
            if (preg_match(
                '/^index\.php\?option=' . preg_quote($component, '/') . '&view=' . preg_quote($view, '/') . '&/',
                $menu->getLink()
            )) {
                $matchedMenus[] = $menu;
            }
        }

        return $matchedMenus;
    }
1187418
protected function reduceTemplateLayouts($templateLayouts, $currentColPos)
    {
        $currentColPos = (int)$currentColPos;
        $restrictions = [];
        $allLayouts = [];
        foreach ($templateLayouts as $key => $layout) {
            if (is_array($layout[0])) {
                if (isset($layout[0]['allowedColPos']) && StringUtility::endsWith($layout[1], '.')) {
                    $layoutKey = substr($layout[1], 0, -1);
                    $restrictions[$layoutKey] = GeneralUtility::intExplode(',', $layout[0]['allowedColPos'], true);
                }
            } else {
                $allLayouts[$key] = $layout;
            }
        }
        if (!empty($restrictions)) {
            foreach ($restrictions as $restrictedIdentifier => $restrictedColPosList) {
                if (!in_array($currentColPos, $restrictedColPosList, true)) {
                    unset($allLayouts[$restrictedIdentifier]);
                }
            }
        }
        return $allLayouts;
    }
349043
public function getEnabledComponents()
    {
        // Create Components List:
        
        $components = ArrayList::create();
        
        // Merge Template Components:
        
        if ($template = $this->getPageTemplate()) {
            $components->merge($template->getEnabledComponents());
        }
        
        // Merge Layout Components:
        
        if ($layout = $this->getPageLayout()) {
            $components->merge($layout->getEnabledComponents());
        }
        
        // Answer Components List:
        
        return $components;
    }
607054
public function filter(&$text, TemplateInterface $template)
    {
        parent::filter($text, $template);

        $this->_parseTags($text);
    }
1304938
public function apply(ComponentInterface $component)
    {
        /**
         * isRootOfCustomizations property used in TargetSelector
         * @see TargetSelector::checkRootCondition
         */
        $component->isRootOfCustomizations = true;
        parent::apply($component);
        unset($component->isRootOfCustomizations);
    }
221365
public function addComponent(Component $component)
	{
		$component->setParentComponent($this);
		$component->setFormComponent($this->formComponent);
		
		$this->components[$component->getName()] = $component;
		
		// Set value if there is one
		$component->setRequestData(is_array($this->inputData) && array_key_exists($component->getName(), $this->inputData) ? $this->inputData[$component->getName()] : null);
	}
918964
public function findComponentByPartial($partial)
    {
        foreach ($this->page->components as $component) {
            if (ComponentPartial::check($component, $partial)) {
                return $component;
            }
        }

        foreach ($this->layout->components as $component) {
            if (ComponentPartial::check($component, $partial)) {
                return $component;
            }
        }

        return null;
    }
439175
private function setRootComponent( common_configuration_Component $component)
    {
        
        $this->rootComponent = $component;
        $components = $this->getComponents();
        $components[] = $component;
        $this->setComponents($components);
        $this->silent($component);
        
    }
911978
public function removeComponent(IComponent $component)
	{
		$name = $component->getName();
		if (!isset($this->components[$name]) || $this->components[$name] !== $component) {
			throw new Nette\InvalidArgumentException("Component named '$name' is not located in this container.");
		}

		unset($this->components[$name]);
		$component->setParent(NULL);
	}
1076213
public void removeToolBarComponent(Component component) {
		validateComponentNonNull(component);

		getToolbar().remove(component);
		getToolbar().validate();
		getToolbar().repaint();
	}
1300309
public function findComponentPlugin($component)
    {
        $className = Str::normalizeClassName(get_class($component));
        if (isset($this->pluginMap[$className])) {
            return $this->pluginMap[$className];
        }

        return null;
    }
568200
protected function doComponentPass(array $components)
    {
        foreach ($components as $component) {
            $instance = $this->container->injectConstructor($component);
            $this->components[$component] = $instance;

            if ($instance instanceof ProviderInterface) {
                $instance->provides($this);
            }
        }

        foreach ($this->components as $instance) {
            $instance->init($this->providers);

            DomainEvents::dispatch(new InitializedComponentEvent($instance));
        }
    }
244539
public function deleteComponentAction(Component $component)
    {
        execute(new RemoveComponentCommand($component));

        return cachet_redirect('dashboard.components')
            ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.components.delete.success')));
    }
484182
public function activate_component( $component ) {

		$activated = false;

		if ( ! $this->is_component_active( $component ) ) {
			if ( empty( $this->components ) ) {
				// Setup components
				PodsInit::$components->get_components();
			}

			if ( isset( $this->components[ $component ] ) ) {
				$this->settings['components'][ $component ] = array();

				$this->update_settings( $this->settings );

				$activated = true;
			}
		} else {
			$activated = true;
		}//end if

		return $activated;

	}
984321
protected function _actionDisable($context)
    {
        $context->response->status = AnHttpResponse::RESET_CONTENT;
        $this->getItem()->disable();

        return;
    }