Check if the current request contains a widget context.
If so dispatch it directly, otherwise continue with the next HTTP component.

@param ComponentContext $componentContext
@return void
@throws ComponentException
516340
public function handle(ComponentContext $componentContext)
    {
        $httpRequest = $componentContext->getHttpRequest();
        $widgetContext = $this->extractWidgetContext($httpRequest);
        if ($widgetContext === null) {
            return;
        }
        /** @var $actionRequest ActionRequest */
        $actionRequest = $this->objectManager->get(\TYPO3\Flow\Mvc\ActionRequest::class, $httpRequest);
        $actionRequest->setArguments($this->mergeArguments($httpRequest, array()));
        $actionRequest->setArgument('__widgetContext', $widgetContext);
        $actionRequest->setControllerObjectName($widgetContext->getControllerObjectName());
        $this->setDefaultControllerAndActionNameIfNoneSpecified($actionRequest);

        $this->securityContext->setRequest($actionRequest);

        $this->dispatcher->dispatch($actionRequest, $componentContext->getHttpResponse());
        // stop processing the current component chain
        $componentContext->setParameter(\TYPO3\Flow\Http\Component\ComponentChain::class, 'cancel', true);
    }
1331141
protected function parseComponent(Component $parentComponent)
    {
        $components = $this->pointer['value'] ?: [];

        foreach ($components as $component) {
            $componentName = static::getTagName($component['name']);
            $currentComponent = $this->root->createComponent(
                $componentName,
                null,
                false
            );

            $this->pointer = &$component;
            $this->parseVCalendarComponents($currentComponent);

            $parentComponent->add($currentComponent);
        }
    }
573906
protected function parseVCardComponents(Component $parentComponent)
    {
        $this->pointer = &$this->pointer['value'];
        $this->parseProperties($parentComponent);
    }
1372796
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WCheckBoxSelect select = (WCheckBoxSelect) component;
		XmlStringBuilder xml = renderContext.getWriter();
		int cols = select.getButtonColumns();
		boolean readOnly = select.isReadOnly();

		xml.appendTagOpen("ui:checkboxselect");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", select.isHidden(), "true");
		if (readOnly) {
			xml.appendAttribute("readOnly", "true");
		} else {
			int min = select.getMinSelect();
			int max = select.getMaxSelect();
			xml.appendOptionalAttribute("disabled", select.isDisabled(), "true");
			xml.appendOptionalAttribute("required", select.isMandatory(), "true");
			xml.appendOptionalAttribute("submitOnChange", select.isSubmitOnChange(), "true");
			xml.appendOptionalAttribute("toolTip", component.getToolTip());
			xml.appendOptionalAttribute("accessibleText", component.getAccessibleText());
			xml.appendOptionalAttribute("min", min > 0, min);
			xml.appendOptionalAttribute("max", max > 0, max);
		}
		xml.appendOptionalAttribute("frameless", select.isFrameless(), "true");

		switch (select.getButtonLayout()) {
			case COLUMNS:
				xml.appendAttribute("layout", "column");
				xml.appendOptionalAttribute("layoutColumnCount", cols > 0, cols);
				break;
			case FLAT:
				xml.appendAttribute("layout", "flat");
				break;
			case STACKED:
				xml.appendAttribute("layout", "stacked");
				break;
			default:
				throw new SystemException("Unknown layout type: " + select.getButtonLayout());
		}


		xml.appendClose();

		// Options
		List<?> options = select.getOptions();
		boolean renderSelectionsOnly = readOnly;

		if (options != null) {
			int optionIndex = 0;
			List<?> selections = select.getSelected();

			for (Object option : options) {
				if (option instanceof OptionGroup) {
					throw new SystemException("Option groups not supported in WCheckBoxSelect.");
				} else {
					renderOption(select, option, optionIndex++, xml, selections,
							renderSelectionsOnly);
				}
			}
		}
		if (!readOnly) {
			DiagnosticRenderUtil.renderDiagnostics(select, renderContext);
		}
		xml.appendEndTag("ui:checkboxselect");
	}
742701
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WCheckBox checkBox = (WCheckBox) component;
		XmlStringBuilder xml = renderContext.getWriter();
		boolean readOnly = checkBox.isReadOnly();

		xml.appendTagOpen(TAG_NAME);
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("hidden", checkBox.isHidden(), "true");
		xml.appendOptionalAttribute("selected", checkBox.isSelected(), "true");
		if (readOnly) {
			xml.appendAttribute("readOnly", "true");
			xml.appendEnd();
			return;
		}

		WComponent submitControl = checkBox.getDefaultSubmitButton();
		String submitControlId = submitControl == null ? null : submitControl.getId();
		WComponentGroup<WCheckBox> group = checkBox.getGroup();
		String groupName = group == null ? null : group.getId();
		xml.appendOptionalAttribute("groupName", groupName);
		xml.appendOptionalAttribute("disabled", checkBox.isDisabled(), "true");
		xml.appendOptionalAttribute("required", checkBox.isMandatory(), "true");
		xml.appendOptionalAttribute("submitOnChange", checkBox.isSubmitOnChange(), "true");
		xml.appendOptionalAttribute("toolTip", checkBox.getToolTip());
		xml.appendOptionalAttribute("accessibleText", checkBox.getAccessibleText());
		xml.appendOptionalAttribute("buttonId", submitControlId);

		List<Diagnostic> diags = checkBox.getDiagnostics(Diagnostic.ERROR);
		if (diags == null || diags.isEmpty()) {
			xml.appendEnd();
			return;
		}
		xml.appendClose();
		DiagnosticRenderUtil.renderDiagnostics(checkBox, renderContext);
		xml.appendEndTag(TAG_NAME);
	}
1236646
public function handle(ComponentContext $componentContext)
    {
        if (!isset($this->options['components'])) {
            return;
        }
        /** @var ComponentInterface $component */
        foreach ($this->options['components'] as $component) {
            if ($component === null) {
                continue;
            }
            $component->handle($componentContext);
            $this->response = $componentContext->getHttpResponse();
            if ($componentContext->getParameter(ComponentChain::class, 'cancel') === true) {
                $componentContext->setParameter(ComponentChain::class, 'cancel', null);
                return;
            }
        }
    }
1217220
public function replaceBy (array $components = null)
  {
    $p = $this->getIndex ();
    if ($p !== false) {
      array_splice ($this->parent->children, $p, 1, $components);
      $this->parent->attach ($components);
    }
    else {
      $t = ComponentInspector::inspectSet ($this->parent->children);
      throw new ComponentException($this,
        "The component was not found on the parent's children.<h3>The children are:</h3><fieldset>$t</fieldset>");
    }
  }
7756
protected function addComponent($component, $value)
    {
        $this->validateComponentExists($component);

        // We need to make sure the value we're given isn't empty before adding it into our components.
        if (! empty($value)) {
            $this->components[$component][] = $value;
        }
    }
771829
public static UIContext getContextForComponent(final WComponent component) {
		// Start with the current Context
		UIContext result = UIContextHolder.getCurrent();
		// Go through the contexts until we find the component
		while (result instanceof SubUIContext && !((SubUIContext) result).isInContext(component)) {
			result = ((SubUIContext) result).getBacking();
		}
		return result;
	}
1128910
public void extendComponent( Component component ) {

		if( this.extendedComponent != null )
			this.extendedComponent.extendingComponents.remove( this );

		component.extendingComponents.add( this );
		this.extendedComponent = component;
	}
768231
public function handle(ComponentContext $componentContext)
    {
        $response = $componentContext->getHttpResponse();
        $response = ResponseInformationHelper::makeStandardsCompliant($response, $componentContext->getHttpRequest());
        $componentContext->replaceHttpResponse($response);
    }
437902
protected void activate(ComponentContext compContext) {
        BundleContext ctx = compContext.getBundleContext();
        mDelayedMBeanActivator = new DelayedMBeanActivator(ctx);
        pipeline.insert(mDelayedMBeanActivator);
        try {
            mbeanTracker = new ServiceTracker<Object, ServiceReference<?>>(ctx, ctx.createFilter("(jmx.objectname=*)"), this);
            mbeanTracker.open(true);
        } catch (InvalidSyntaxException ise) {

        }
    }
1227431
public function canUseColumnComponentInCriteria(string $componentId) : bool
    {
        return $this->definition->getDataSource()->getStructure()->hasComponent($componentId);
    }
1096422
@Override
	public void render(final WComponent component, final RenderContext context) {
		PrintWriter out = ((WebXmlRenderContext) context).getWriter();

		// If we are debugging the layout, write markers so that the html
		// designer can see where templates start and end.
		boolean debugLayout = ConfigurationProperties.getDeveloperVelocityDebug();

		if (debugLayout) {
			String templateUrl = url;

			if (url == null && component instanceof AbstractWComponent) {
				templateUrl = ((AbstractWComponent) component).getTemplate();
			}

			out.println("<!-- Start " + templateUrl + " -->");
			paintXml(component, out);
			out.println("<!-- End   " + templateUrl + " -->");
		} else {
			paintXml(component, out);
		}
	}
167701
protected function _beforeRender(ControllerContext $context)
    {
        $controller = $context->getSubject();

        if (!$controller->isDispatched()) {
            $controller->loadLanguage();
        }
    }
1059623
@Activate
    protected void activate(ComponentContext componentContext, Map<String, Object> props) {
        this.componentContext = componentContext;

        // // Parse the configuration that we've been provided
        // Dictionary<?, ?> configProperties = componentContext.getProperties();
        // processConfigProperties(configProperties);

        // Hold a reference to the bundle context
        bundleContext = componentContext.getBundleContext();

        // Start listening to the framework events so we can publish them
        // as specified in section 113.6.3
        frameworkEventAdapter = new FrameworkEventAdapter(this);
        bundleContext.addFrameworkListener(frameworkEventAdapter);

        // Start listening to the bundle events so we can publish them
        // as specified in section 113.6.4
        bundleEventAdapter = new BundleEventAdapter(this);
        bundleContext.addBundleListener(bundleEventAdapter);

        // Start listening to the service events so we can publish them
        // as specified in section 113.6.5
        serviceEventAdapter = new ServiceEventAdapter(this);
        bundleContext.addServiceListener(serviceEventAdapter);
        processConfigProperties(props);
    }
1304938
public function apply(ComponentInterface $component)
    {
        /**
         * isRootOfCustomizations property used in TargetSelector
         * @see TargetSelector::checkRootCondition
         */
        $component->isRootOfCustomizations = true;
        parent::apply($component);
        unset($component->isRootOfCustomizations);
    }