PHP 8.2.30
Preview: FormRendererInterface.php Size: 3.20 KB
//opt/cloudlinux/alt-php54/root/usr/share/pear/Symfony/Component/Form/FormRendererInterface.php

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Form;

/**
 * Renders a form into HTML.
 *
 * @author Bernhard Schussek <bschussek@gmail.com>
 */
interface FormRendererInterface
{
    /**
     * Returns the engine used by this renderer.
     *
     * @return FormRendererEngineInterface The renderer engine.
     */
    public function getEngine();

    /**
     * Sets the theme(s) to be used for rendering a view and its children.
     *
     * @param FormView $view   The view to assign the theme(s) to.
     * @param mixed             $themes The theme(s). The type of these themes
     *                                  is open to the implementation.
     */
    public function setTheme(FormView $view, $themes);

    /**
     * Renders a named block of the form theme.
     *
     * @param FormView $view      The view for which to render the block.
     * @param string   $blockName The name of the block.
     * @param array    $variables The variables to pass to the template.
     *
     * @return string The HTML markup
     */
    public function renderBlock(FormView $view, $blockName, array $variables = array());

    /**
     * Searches and renders a block for a given name suffix.
     *
     * The block is searched by combining the block names stored in the
     * form view with the given suffix. If a block name is found, that
     * block is rendered.
     *
     * If this method is called recursively, the block search is continued
     * where a block was found before.
     *
     * @param FormView $view            The view for which to render the block.
     * @param string   $blockNameSuffix The suffix of the block name.
     * @param array    $variables       The variables to pass to the template.
     *
     * @return string The HTML markup
     */
    public function searchAndRenderBlock(FormView $view, $blockNameSuffix, array $variables = array());

    /**
     * Renders a CSRF token.
     *
     * Use this helper for CSRF protection without the overhead of creating a
     * form.
     *
     * <code>
     * <input type="hidden" name="token" value="<?php $renderer->renderCsrfToken('rm_user_'.$user->getId()) ?>">
     * </code>
     *
     * Check the token in your action using the same token ID.
     *
     * <code>
     * $csrfProvider = $this->get('security.csrf.token_generator');
     * if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) {
     *     throw new \RuntimeException('CSRF attack detected.');
     * }
     * </code>
     *
     * @param string $tokenId The ID of the CSRF token
     *
     * @return string A CSRF token
     */
    public function renderCsrfToken($tokenId);

    /**
     * Makes a technical name human readable.
     *
     * Sequences of underscores are replaced by single spaces. The first letter
     * of the resulting string is capitalized, while all other letters are
     * turned to lowercase.
     *
     * @param string $text The text to humanize.
     *
     * @return string The humanized text.
     */
    public function humanize($text);
}

Directory Contents

Dirs: 6 × Files: 49

Name Size Perms Modified Actions
Exception DIR
- drwxr-xr-x 2024-03-03 22:54:51
Edit Download
Extension DIR
- drwxr-xr-x 2024-03-03 22:54:50
Edit Download
Guess DIR
- drwxr-xr-x 2024-03-03 22:54:51
Edit Download
Resources DIR
- drwxr-xr-x 2024-03-03 22:54:50
Edit Download
Test DIR
- drwxr-xr-x 2024-03-03 22:54:51
Edit Download
Util DIR
- drwxr-xr-x 2024-03-03 22:54:51
Edit Download
4.77 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
7.46 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.05 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
993 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
334 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
8.62 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
18.09 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
462 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.09 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
559 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.10 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
3.08 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
34.05 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
7.69 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.28 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
21.17 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
8.46 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
6.29 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.50 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.22 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.11 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.63 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
5.10 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
3.52 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.99 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
4.14 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
8.13 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
4.64 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.41 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
11.67 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
6.90 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
3.20 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
5.76 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.08 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.81 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.12 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
3.15 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
3.44 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
5.48 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.26 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
668 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
7.48 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
658 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.27 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
3.23 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.23 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.11 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
624 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
474 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).