/** * @param RenderingContextInterface $renderingContext * @param array $arguments * @param \Closure $renderChildrenClosure * @return Custom */ public static function getComponent(RenderingContextInterface $renderingContext, array $arguments, \Closure $renderChildrenClosure) { /** @var Custom $component */ $component = parent::getPreparedComponent('Custom', $renderingContext, $arguments); $closure = static::buildClosure($renderingContext, $arguments, $renderChildrenClosure); $component->setClosure($closure); return $component; }
/** * @return Custom */ public function getComponent() { /** @var Custom $component */ $component = parent::getComponent('Custom'); $closure = $this->buildClosure(); $component->setClosure($closure); return $component; }