Get the evaluated view contents for the given form.

@param  string $form
@param array $params
@return $this
323714
public function make($form, $params = [])
    {
        $this->form = $form;

        $this->setParams($params);

        return clone $this;
    }
880229
protected function makeRequestUsingForm(Form $form, array $uploads = [])
    {
        $files = $this->convertUploadsForTesting($form, $uploads);

        return $this->makeRequest(
            $form->getMethod(), $form->getUri(), $this->extractParametersFromForm($form), [], $files
        );
    }
349032
public function indexAction($form = null)
    {
        $form = $form ?: $this->createForm(BasketType::class, $this->get('sonata.basket'), [
            'validation_groups' => ['elements'],
        ]);

        // always validate the basket
        if (!$form->isSubmitted()) {
            if ($violations = $this->get('validator')->validate($form)) {
                $violationMapper = new ViolationMapper();
                foreach ($violations as $violation) {
                    $violationMapper->mapViolation($violation, $form, true);
                }
            }
        }

        $this->get('session')->set('sonata_basket_delivery_redirect', 'sonata_basket_delivery_address');

        $this->get('sonata.seo.page')->setTitle($this->get('translator')->trans('basket_index_title', [], 'SonataBasketBundle'));

        return $this->render('SonataBasketBundle:Basket:index.html.twig', [
            'basket' => $this->get('sonata.basket'),
            'form' => $form->createView(),
        ]);
    }
572586
public function renderForm(Form $form)
	{
		foreach ($form as $element)
		{
			$this->render($element);
		}

		$tableRender = new SimpleTable();
		$tableContent = $tableRender->renderTable($this->table);

		return Html::tag('form', $form->getAttributes(), $tableContent);
	}
580131
public function build( Form $form, $offset, $length, $params = array() ) {

        $data = $form->getData();

        if ($length == 0)
            return array( 'query' => $data['term'], 'sort_by' => array( 'name' => 'asc' ), 'offset' => $offset );
        else
            return array( 'query' => $data['term'], 'sort_by' => array( 'name' => 'asc' ), 'offset' => $offset, 'limit' => $length );
    }
992682
public function results($data, $form, $request)
    {
        $result     = null;
        $results = $form->getResults();
        $query     = $form->getSearchQuery();

        // Add context summaries based on the queries.
        foreach ($results as $result) {
            $contextualTitle         = new Text();
            $contextualTitle->setValue($result->MenuTitle ? $result->MenuTitle : $result->Title);
            $result->ContextualTitle = $contextualTitle->ContextSummary(300, $query);

            if (!$result->Content && $result->ClassName == 'File') {
                // Fake some content for the files.
                $result->ContextualContent = "A file named \"$result->Name\" ($result->Size).";
            } else {
                // /(.?)\[embed(.*?)\](.+?)\[\/\s*embed\s*\](.?)/gi
                $valueField                     = $result->obj('Content');
                $valueField->setValue(ShortcodeParser::get_active()->parse($valueField->getValue()));
                $result->ContextualContent     = $valueField->ContextSummary(300, $query);
            }
        }

        $rssLink = HTTP::setGetVar('rss', '1');

        // Render the result.
        $context = array(
            'Results'     => $results,
            'Query'         => $query,
            'Title'         => _t('SearchForm.SearchResults', 'Search Results'),
            'RSSLink'     => $rssLink
        );

        // Choose the delivery method - rss or html.
        if (!$this->owner->request->getVar('rss')) {
            // Add RSS feed to normal search.
            RSSFeed::linkToFeed($rssLink, "Search results for query \"$query\".");

            $result = $this->owner->customise($context)->renderWith(array('Page_results', 'Page'));
        } else {
            // De-paginate and reorder. Sort-by-relevancy doesn't make sense in RSS context.
            $fullList = $results->getList()->sort('LastEdited', 'DESC');

            // Get some descriptive strings
            $siteName     = SiteConfig::current_site_config()->Title;
            $siteTagline = SiteConfig::current_site_config()->Tagline;
            if ($siteName) {
                $title = "$siteName search results for query \"$query\".";
            } else {
                $title = "Search results for query \"$query\".";
            }

            // Generate the feed content.
            $rss     = new RSSFeed($fullList, $this->owner->request->getURL(), $title, $siteTagline, "Title", "ContextualContent", null);
            $rss->setTemplate('Page_results_rss');
            $result     = $rss->outputToBrowser();
        }
        return $result;
    }
1096683
public function retrieveFormBlocks($requestParams = NULL)
    {
        return $this->client->request($requestParams, $this->_endpoint . "/" . self::FORM_BLOCKS, "get", NULL, $options = NULL);
    }
712230
protected function generateTabbedFormSet($forms)
    {
        if (count($forms) === 1) {
            return $forms;
        }

        $viewData = new ArrayData([
            'Forms' => new ArrayList($forms),
        ]);

        return $viewData->renderWith(
            $this->getTemplatesFor('MultiAuthenticatorTabbedForms')
        );
    }
1210532
public function createFormView(FormInterface $form)
    {
        $post = $this->eavManager->initializeEntity($form->getSchema());

        $form = $this->formFactory->create(PostType::class, $post, ['form_id' => $form->getId()]);

        return $form->createView();
    }
620471
public function editFormSucceeded(Form $form, ArrayHash $values): void
	{
		if ($this->content) {
			$content = $this->content;
		} else {
			$content = new Content;
			$this->orm->content->attach($content);
		}

		try {
			if ($this->editConst) {
				$content->locale = $values->locale;
				$content->setConst($values->const);
			}
			$content->name = $values->name;
			$content->title = $values->title;
			$content->keywords = $values->keywords;
			$content->image = $values->image;
			$content->background = $values->background;
			$content->description = $values->description;
			$content->content = $values->content;

			$this->orm->persistAndFlush($content);
			$this->restoreBacklink();
		} catch (UniqueConstraintViolationException $ex) {
			$form->addError('webManager.web.content.constantExists');
		}
	}
444081
public function renderForm($form, $values=array())
    {
        $result = '';
        if (isset($form['tabs']))
        {
            $result .= $this->renderTabs($form['tabs']);
        }
        $wnd['caption'] = $form['caption'];
        $wnd['width'] = isset($form['width'])?$form['width']:'';
        $wnd['style'] = 'padding: 0px;';

        $form = new Form($form, $values);
        $wnd['body'] = $form->render();
        $result .= $this->window($wnd);
        return $result;
    }
887116
public function tabBuilder(\samsoncms\app\material\form\Form & $form)
    {
        // If we have related structures
        if (count($form->navigationIDs)) {
            // Get all gallery additional field for material form structures
            $galleryFields = $this->query->entity(\samsoncms\api\Field::class)
                ->where('Type', 9)
                ->join('structurefield')
                ->where('structurefield_StructureID', $form->navigationIDs)
                ->exec();

            // Create tab for each additional gallery field
            foreach ($galleryFields as $field) {
                $form->tabs[] = new Gallery($this, $this->query, $form->entity, $field);
            }
        }
    }
708417
public function form_radio($params) {
        if (!isset($params['field'])) {
            throw new \UnexpectedValueException("The field parameter is required.");
        }
        $value = isset($params['value']) ? $params['value'] : null;
        $attributes = isset($params['attrs']) ? $params['attrs'] : array();
        $checked = isset($params['checked']) ? $params['checked'] : null;
        return Form::checkbox($params['field'], $value, $checked, $attributes);
    }
644320
public function display(Form $form) {
        if (!$this->visible){
            return "";
        }
        $this->form = $form;
        if (!isset($this->rowHtmlOptions['class'])) {
            $this->rowHtmlOptions['class'] = $this->rowClass;
        } else {
            $this->rowHtmlOptions['class'] .= ' ' . $this->rowClass;
        }
        if (!is_null($this->getError())){
            $this->rowHtmlOptions['class'] .= ' has-error';
        }
        return Html::get()->tag('div', $this->getContent(), $this->rowHtmlOptions);
    }
1237174
public function setForm(\Opifer\CmsBundle\Entity\Form $form = null)
    {
        $this->form = $form;

        return $this;
    }
316292
public function form_hidden($params) {
        if (!isset($params['field'])) {
            throw new \UnexpectedValueException("The field parameter is required.");
        }
        $value = isset($params['value']) ? $params['value'] : null;
        $attributes = isset($params['attrs']) ? $params['attrs'] : array();
        return Form::hidden($params['field'], $value, $attributes);
    }
2101
public function getPrmForUrl(Form $form)
    {
        $ret = array();
        foreach ($form->getData() as $k => $data) {
            if (isset($data['value'])) {
                $data['value'] = $this->prepareDataForUrl($data['value'], $form->get($k)->get('value'));
                $ret[$k] = $data;
            }
        }

        return count($ret) ? array($form->getName() => $ret) : array();
    }