Set parameters to a renderer object in parameter.

@param AbstractRenderer $render
@param array     $params
176297
private function setRenderParams(AbstractRenderer $render, $params)
    {
        if (null !== $params) {
            $params = (array) $params;
            foreach ($params as $param => $value) {
                $render->setParam($param, $value);
            }
        }
    }
404647
public function addRendererAdapter(RendererAdapterInterface $rendererAdapter)
    {
        $key = $this->getRendererAdapterKey($rendererAdapter);
        if (!$this->rendererAdapters->has($key)) {
            $this->rendererAdapters->set($key, $rendererAdapter);
            $this->addManagedExtensions($rendererAdapter);
        }

        if (null === $this->defaultAdapter) {
            $this->defaultAdapter = $key;
        }
    }
10507
protected function _setInputParams(array &$params) {
        foreach ($params as $paramKey => $paramValue) {
            if (in_array($paramKey, $this->args, true)
                && !is_null($paramValue)
            ) {
                $this->_inputParams[$paramKey] = $paramValue;
            }
        }

        $this->_params = array_merge($this->_params, $this->_inputParams);
    }
492540
public function render($view, $params = array(), $context = null)
    {
        if ($context === null) {
            $context = $this->context;
        }

        return parent::render($view, $params, $context);
    }
438289
public function onPostRenderContent(RendererEvent $event)
    {
        // Checks if content caching is available
        $this->object = $event->getTarget();
        if (false === ($this->object instanceof AbstractClassContent) || false === $this->checkCacheContentEvent()) {
            return;
        }

        $renderer = $event->getRenderer();
        // Checks if cache_id is available
        if (false === $cache_id = $this->getContentCacheId($renderer)) {
            return;
        }

        // Gets the lifetime to set
        if (null === $lifetime = $this->object->getProperty('cache-lifetime')) {
            $lifetime = 0;
        }

        // Computes $lifetime according param and children
        $uids = $this->application->getEntityManager()->getRepository(ClassUtils::getRealClass($this->object))
            ->getUnorderedChildrenUids($this->object)
        ;

        $lifetime = $this->cache_content->getMinExpireByTag($uids, $lifetime);

        $render = $event->getRender();
        $this->cache_content->save($cache_id, $render, $lifetime, $this->object->getUid());
        $this->application->debug(sprintf(
            'Save cache (id: %s, lifetime: %d) for rendering `%s(%s)` with mode `%s`.',
            $cache_id,
            $lifetime,
            get_class($this->object),
            $this->object->getUid(),
            $renderer->getMode()
        ));
    }
1305798
public function render(array $arguments = [], $renderer = null) {
        $this->runDynamicCallbacks($arguments);

        return $this->baseRender($arguments, $renderer);
    }
870808
public function render(AbstractRenderer $renderer = null, $active = null)
    {
        if (is_null($renderer)) {
            $renderer = $this->getRenderer();
        }

        return $renderer->render($this->getRelations(), $active);
    }
101071
public function setComponentParameter(string $componentClassName, string $parameterName, $value): void
    {
        if (!isset($this->componentParameters[$componentClassName])) {
            $this->componentParameters[$componentClassName] = [];
        }
        $this->componentParameters[$componentClassName][$parameterName] = $value;
    }
506889
protected function setParams(array $params) {
		parent::setParams($params);
		$ref = $this->relative ? str_replace('(%s)://', '(?:(%s)://)?', $this->ref) : $this->ref;
		$this->ref = sprintf($ref, implode('|', $this->protocols));
	}
87510
public function setRenderer($renderer)
    {
        $this->renderer = $renderer instanceof AbstractRenderer ?: $this->getRendererManager()->getRenderer((string) $renderer);

        return $this;
    }
62650
protected function registerTokenRenderer($tokenName, $callbackName, Renderer $renderer) {
        $renderer->registerTokenRenderer($tokenName, [$this, $callbackName], $this->set->getName());
    }
541274
public static function render($xml, array $params = [])
	{
		$renderer = static::getCachedRenderer();

		if (!empty($params))
		{
			$renderer->setParameters($params);
		}

		if (isset(static::$beforeRender))
		{
			$xml = call_user_func(static::$beforeRender, $xml);
		}

		$output = $renderer->render($xml);

		if (isset(static::$afterRender))
		{
			$output = call_user_func(static::$afterRender, $output);
		}

		return $output;
	}
1283483
public static function setRenderer($renderer) {
        if(ClassInfo::classImplements($renderer, 'IMarkdownRenderer')) {
            self::$renderer=$renderer;
        }else {
            user_error('The renderer '.$renderer.' does not implement IMarkdownRenderer', E_USER_ERROR);
        }
    }
36670
public function setOptions(array $options)
    {
        if (isset($options['label'])) {
            $this->setLabel($options['label']);
        }

        if ($this instanceof FormElementInterface) {
            if (isset($options['defaultValue'])) {
                $this->setDefaultValue($options['defaultValue']);
            }

            if (isset($options['properties'])) {
                foreach ($options['properties'] as $key => $value) {
                    $this->setProperty($key, $value);
                }
            }
        }

        if (isset($options['rendererClassName'])) {
            $this->setRendererClassName($options['rendererClassName']);
        }

        if (isset($options['renderingOptions'])) {
            foreach ($options['renderingOptions'] as $key => $value) {
                $this->setRenderingOption($key, $value);
            }
        }

        if (isset($options['validators'])) {
            foreach ($options['validators'] as $validatorConfiguration) {
                $this->createValidator($validatorConfiguration['identifier'], isset($validatorConfiguration['options']) ? $validatorConfiguration['options'] : []);
            }
        }

        FormArrays::assertAllArrayKeysAreValid($options, array('label', 'defaultValue', 'properties', 'rendererClassName', 'renderingOptions', 'validators'));
    }
234613
function setClass( $value, $params=FALSE ) {
    $this->class['value']  = $value;
    $this->class['params'] = $this->_setParams( $params );
  }
304014
public function adjustRender ($render = null) {
		$render = $render ?: $this->render;

		if ($render === null) {
			$render = [];
		} else if ($render instanceof \ickx\fw2\vartype\arrays\LazyArrayObject) {
			$render = $render->getRecursiveArrayCopy();
		} else if ($render instanceof \ArrayObject) {
			$render = $render->getArrayCopy();
		}

		if (!isset($render['data'])) {
			$render['data'] = [];
		}

		$render['file_upload'] = isset($this->fileUpload) ? $this->fileUpload : null;

		$render['url'] = (isset($render['url']) ? $render['url'] : '');
		$render['data'] += (isset($render['data']) ? $render['data'] : []) + Request::GetPostData()->getArrayCopy();
		$render['parameters'] = $this->request->parameter instanceof \ArrayObject ? $this->request->parameter->getArrayCopy() : $this->request->parameter;
		$render['querys'] = Request::GetParameters() instanceof \ArrayObject? Request::GetParameters()->getArrayCopy() : Request::GetParameters();
		$render['route'] = $this->route;

		$render['controller']	= $this->controller;
		$render['action']		= $this->action;

		$render['has_validator'] = $this->hasValidator;
		$render['error'] = $this->error;
		$render['warn'] = $this->warn;
		$render['info'] = $this->info;

		$options = $this->options->getArrayCopy();
		foreach ($options as $key => $value) {
			$options[$key] = preg_replace_callback("/\{:(.+?)\}/", function (array $matches) use ($render, $options) {$replace = isset($render[$matches[1]]) ? $render[$matches[1]] : (isset($options[$matches[1]]) ? $options[$matches[1]] : $matches[0]);return is_callable($replace) ? $replace($render, $options) : $replace;}, is_callable($value) ? $value($render, $options) : $value);
		}
		$render += $render + $options;

		$request_uri = Environment::IsCli() ? (Cli::GetRequestParameterList()[0] ?? '') : $_SERVER['REQUEST_URI'];
		$render['canonical_url']	= isset($render['canonical_url']) ? $render['canonical_url'] : parse_url(''.$request_uri, \PHP_URL_PATH);

		$render['layout_path']	= implode('.', [Strings::ToSnakeCase($this->layout), $this->mimeType, 'twig']);

		DI::Connect('render', $render);

		return $render;
	}
153390
public final function render(OutputBuffer $out, ViewModelInterface $model, array $params = [])
	{
		$this->context->bind($model);
		$this->context->set('@view', $this);
		
		foreach($params as $k => $v)
		{
			$this->context->set($k, $v);
		}
		
		try
		{
			if($this->getParent() === NULL)
			{
				$this->renderMain($out);
			}
			else
			{
				$this->parent->renderMain($out);
			}

			return $out;
		}
		finally
		{
			$this->parent = false;
			$this->context->unbind();
		}
	}