diff --git a/.gitignore b/.gitignore index a5eb433eea3..6a20088680a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /_build/doctrees +/_build/spelling /_build/html *.pyc diff --git a/_build/.requirements.txt b/_build/.requirements.txt index 53c6c3ddff0..6f1f8953dff 100644 --- a/_build/.requirements.txt +++ b/_build/.requirements.txt @@ -9,5 +9,5 @@ pytz==2017.2 requests==2.20.0 six==1.10.0 snowballstemmer==1.2.1 -Sphinx==1.3.6 +sphinx==1.3.6 git+https://github.com/fabpot/sphinx-php.git@7312eccce9465640752e51373a480da700e02345#egg_name=sphinx-php diff --git a/_build/conf.py b/_build/conf.py index b707b25a477..998fb450a08 100644 --- a/_build/conf.py +++ b/_build/conf.py @@ -37,8 +37,13 @@ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sensio.sphinx.refinclude', 'sensio.sphinx.configurationblock', 'sensio.sphinx.phpcode', 'sensio.sphinx.bestpractice', 'sensio.sphinx.codeblock', 'symfonycom.sphinx' + #,'sphinxcontrib.spelling' ] +#spelling_show_sugestions=True +#spelling_lang='en_US' +#spelling_word_list_filename='_build/spelling_word_list.txt' + # Add any paths that contain templates here, relative to this directory. # templates_path = ['_theme/_templates'] diff --git a/_build/spelling_word_list.txt b/_build/spelling_word_list.txt new file mode 100644 index 00000000000..10a9c2896e1 --- /dev/null +++ b/_build/spelling_word_list.txt @@ -0,0 +1,347 @@ +accessor +advertize +Akamai +analytics +Ansi +Ansible +Assetic +async +authenticator +authenticators +autocompleted +autocompletion +autoconfiguration +autoconfigure +autoconfigured +autoconfigures +autoconfiguring +autoload +autoloaded +autoloader +autoloaders +autoloading +autoprefixing +autowire +autowireable +autowired +autowiring +backend +backends +balancer +balancers +bcrypt +benchmarking +Bitbucket +bitmask +bitmasks +bitwise +Blackfire +boolean +booleans +Brasseur +browserslist +buildpack +buildpacks +bundler +cacheable +Caddy +callables +camelCase +casted +changelog +changeset +charset +charsets +checkboxes +classmap +classname +clearers +cloner +cloners +codebase +config +configs +configurator +configurators +contrib +cron +cronjobs +cryptographic +cryptographically +Ctrl +ctype +cURL +customizable +customizations +Cygwin +dataset +datepicker +decrypt +denormalization +denormalize +denormalized +denormalizing +deprecations +deserialization +deserialize +deserialized +deserializing +destructor +dev +dn +DNS +docblock +Dotenv +downloader +Doxygen +DSN +Dunglas +easter +Eberlei +emilie +enctype +entrypoints +enum +env +escaper +escpaer +extensibility +extractable +eZPublish +Fabien +failover +filesystem +filesystems +formatter +formatters +fortrabbit +frontend +getter +getters +GitHub +gmail +Gmail +Goutte +grapheme +hardcode +hardcoded +hardcodes +hardcoding +hasser +hassers +headshot +HInclude +hostname +https +iconv +igbinary +incrementing +ini +inlined +inlining +installable +instantiation +interoperable +intl +Intl +invokable +IPv +isser +issers +Jpegoptim +jQuery +js +Karlton +kb +kB +Kévin +Ki +KiB +kibibyte +Kubernetes +Kudu +labelled +latin +Ldap +libketama +licensor +lifecycle +liip +linter +localhost +Loggly +Logplex +lookups +loopback +lorenzo +Luhn +macOS +matcher +matchers +mbstring +mebibyte +memcache +memcached +MiB +michelle +minification +minified +minifier +minifies +minify +minifying +misconfiguration +misconfigured +misgendering +Monolog +mutator +nagle +namespace +namespaced +namespaces +namespacing +natively +nd +netmasks +nginx +normalizer +normalizers +npm +nyholm +OAuth +OPcache +overcomplicate +Packagist +parallelizes +parsers +PHP +PHPUnit +PID +plaintext +polyfill +polyfills +postcss +Potencier +pre +preconfigured +predefines +Predis +preload +preloaded +preloading +prepend +prepended +prepending +prepends +preprocessed +preprocessors +Procfile +profiler +programmatically +prototyped +rebase +reconfiguring +reconnection +redirections +refactorization +regexes +renderer +resolvers +responder +reStructuredText +reusability +runtime +sandboxing +schemas +screencast +semantical +serializable +serializer +sexualized +Silex +sluggable +socio +specificities +SQLite +stacktrace +stacktraces +storages +stringified +stylesheet +stylesheets +subclasses +subdirectories +subdirectory +sublcasses +sublicense +sublincense +subrequests +subtree +superclass +superglobal +superglobals +symfony +Symfony +symlink +symlinks +syntaxes +templating +testability +th +theming +throbber +timestampable +timezones +TLS +tmpfs +tobias +todo +Tomayko +Toolbelt +tooltip +Traversable +triaging +UI +uid +unary +unauthenticate +uncacheable +uncached +uncomment +uncommented +undelete +unhandled +unicode +Unix +unmapped +unminified +unported +unregister +unrendered +unserialize +unserialized +unserializing +unsubmitted +untracked +uploader +URI +validator +validators +variadic +VirtualBox +Vue +webpack +webpacked +webpackJsonp +webserver +whitespace +whitespaces +woh +Wordpress +Xdebug +xkcd +Xliff +XML +XPath +yaml +yay diff --git a/best_practices/creating-the-project.rst b/best_practices/creating-the-project.rst index dc1f8dd3a50..abcda84b621 100644 --- a/best_practices/creating-the-project.rst +++ b/best_practices/creating-the-project.rst @@ -106,7 +106,7 @@ following: Application Bundles ~~~~~~~~~~~~~~~~~~~ -When Symfony 2.0 was released, most developers naturally adopted the symfony +When Symfony 2.0 was released, most developers naturally adopted the Symfony 1.x way of dividing applications into logical modules. That's why many Symfony applications use bundles to divide their code into logical features: UserBundle, ProductBundle, InvoiceBundle, etc. diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index 82c2f83b0bf..c9b68c1443b 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -188,7 +188,7 @@ The index file (for example ``Resources/doc/index.rst`` or ``Resources/doc/index.md``) is the only mandatory file and must be the entry point for the documentation. The :doc:`reStructuredText (rST) ` is the format -used to render the documentation on symfony.com. +used to render the documentation on the Symfony website. Installation Instructions ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/components/cache/adapters/php_array_cache_adapter.rst b/components/cache/adapters/php_array_cache_adapter.rst index a0e351b7f7a..c27e4fd2ecf 100644 --- a/components/cache/adapters/php_array_cache_adapter.rst +++ b/components/cache/adapters/php_array_cache_adapter.rst @@ -2,7 +2,7 @@ single: Cache Pool single: PHP Array Cache -Php Array Cache Adapter +PHP Array Cache Adapter ======================= This adapter is a high performance cache for static data (e.g. application configuration) diff --git a/components/cache/adapters/php_files_adapter.rst b/components/cache/adapters/php_files_adapter.rst index e4b55067052..8e693be63ec 100644 --- a/components/cache/adapters/php_files_adapter.rst +++ b/components/cache/adapters/php_files_adapter.rst @@ -4,7 +4,7 @@ .. _component-cache-files-adapter: -Php Files Cache Adapter +PHP Files Cache Adapter ======================= Similarly to :ref:`Filesystem Adapter `, this cache diff --git a/components/dotenv.rst b/components/dotenv.rst index f09c242e226..85e2b0bccfd 100644 --- a/components/dotenv.rst +++ b/components/dotenv.rst @@ -28,7 +28,7 @@ Sensitive information and environment-dependent settings should be defined as environment variables (as recommended for `twelve-factor applications`_). Using a ``.env`` file to store those environment variables eases development and CI management by keeping them in one "standard" place and agnostic of the -technology stack you are using (Nginx vs PHP built-in server for instance). +technology stack you are using (nginx vs PHP built-in server for instance). .. note:: diff --git a/components/http_foundation.rst b/components/http_foundation.rst index a9c7117e043..311ecbe08af 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -477,10 +477,10 @@ represented by a PHP callable instead of a string:: Additionally, PHP isn't the only layer that can buffer output. Your web server might also buffer based on its configuration. Some servers, such as - Nginx, let you disable buffering at the config level or by adding a special HTTP + nginx, let you disable buffering at the config level or by adding a special HTTP header in the response:: - // disables FastCGI buffering in Nginx only for this response + // disables FastCGI buffering in nginx only for this response $response->headers->set('X-Accel-Buffering', 'no') .. _component-http-foundation-serving-files: @@ -517,7 +517,7 @@ Alternatively, if you are serving a static file, you can use a The ``BinaryFileResponse`` will automatically handle ``Range`` and ``If-Range`` headers from the request. It also supports ``X-Sendfile`` -(see for `Nginx`_ and `Apache`_). To make use of it, you need to determine +(see for `nginx`_ and `Apache`_). To make use of it, you need to determine whether or not the ``X-Sendfile-Type`` header should be trusted and call :method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::trustXSendfileTypeHeader` if it should:: @@ -665,7 +665,7 @@ Learn More /session/* /http_cache/* -.. _Nginx: https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/ +.. _nginx: https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/ .. _Apache: https://tn123.org/mod_xsendfile/ .. _`JSON Hijacking`: http://haacked.com/archive/2009/06/25/json-hijacking.aspx .. _OWASP guidelines: https://www.owasp.org/index.php/OWASP_AJAX_Security_Guidelines#Always_return_JSON_with_an_Object_on_the_outside diff --git a/components/http_foundation/session_configuration.rst b/components/http_foundation/session_configuration.rst index d4669ac85ec..8f8ce6e8ce7 100644 --- a/components/http_foundation/session_configuration.rst +++ b/components/http_foundation/session_configuration.rst @@ -23,7 +23,7 @@ Native PHP Save Handlers ------------------------ So-called native handlers, are save handlers which are either compiled into -PHP or provided by PHP extensions, such as PHP-Sqlite, PHP-Memcached and so on. +PHP or provided by PHP extensions, such as PHP-SQLite, PHP-Memcached and so on. All native save handlers are internal to PHP and as such, have no public facing API. They must be configured by ``php.ini`` directives, usually ``session.save_path`` and diff --git a/components/intl.rst b/components/intl.rst index eec1c2c9573..ae4634ffe30 100644 --- a/components/intl.rst +++ b/components/intl.rst @@ -116,7 +116,7 @@ PhpBundleWriter ~~~~~~~~~~~~~~~ The :class:`Symfony\\Component\\Intl\\ResourceBundle\\Writer\\PhpBundleWriter` -writes an array or an array-like object to a .php resource bundle:: +writes an array or an array-like object to a ``.php`` resource bundle:: use Symfony\Component\Intl\ResourceBundle\Writer\PhpBundleWriter; @@ -147,7 +147,7 @@ PhpBundleReader ~~~~~~~~~~~~~~~ The :class:`Symfony\\Component\\Intl\\ResourceBundle\\Reader\\PhpBundleReader` -reads resource bundles from .php files and returns an array or an array-like +reads resource bundles from ``.php`` files and returns an array or an array-like object:: use Symfony\Component\Intl\ResourceBundle\Reader\PhpBundleReader; diff --git a/components/phpunit_bridge.rst b/components/phpunit_bridge.rst index 838c8f7bc7c..409647e3a0c 100644 --- a/components/phpunit_bridge.rst +++ b/components/phpunit_bridge.rst @@ -145,7 +145,7 @@ a directory containing multiple test suites with their own ``phpunit.xml.dist``. $ ./vendor/bin/simple-phpunit tests/ The modified PHPUnit script will recursively go through the provided directory, -up to a depth of 3 subfolders or the value specified by the environment variable +up to a depth of 3 subdirectories or the value specified by the environment variable ``SYMFONY_PHPUNIT_MAX_DEPTH``, looking for ``phpunit.xml.dist`` files and then running each suite it finds in parallel, collecting their output and displaying each test suite's results in their own section. @@ -558,7 +558,7 @@ classes' namespace. In order to work as expected, the listener has to run before the tested class ever runs. By default, the mocked functions are created when the annotation are found and the corresponding tests are run. Depending on how your tests are constructed, this might be too late. In this case, you will need to declare -the namespaces of the tested classes in your phpunit.xml.dist +the namespaces of the tested classes in your ``phpunit.xml.dist``. .. code-block:: xml diff --git a/components/process.rst b/components/process.rst index 5b3c66d3924..ea626f31a38 100644 --- a/components/process.rst +++ b/components/process.rst @@ -387,10 +387,10 @@ When running a program asynchronously, you can send it POSIX signals with the // will send a SIGKILL to the process $process->signal(SIGKILL); -Process Pid +Process PID ----------- -You can access the `pid`_ of a running process with the +You can access the `PID`_ of a running process with the :method:`Symfony\\Component\\Process\\Process::getPid` method:: use Symfony\Component\Process\Process; @@ -443,6 +443,6 @@ absolute path of the executable PHP binary available on your server:: $phpBinaryPath = $phpBinaryFinder->find(); // $phpBinaryPath = '/usr/local/bin/php' (the result will be different on your computer) -.. _`pid`: https://en.wikipedia.org/wiki/Process_identifier +.. _`PID`: https://en.wikipedia.org/wiki/Process_identifier .. _`PHP streams`: https://www.php.net/manual/en/book.stream.php .. _`output_buffering`: https://www.php.net/manual/en/outcontrol.configuration.php diff --git a/configuration.rst b/configuration.rst index fc9159be114..49b5589cee8 100644 --- a/configuration.rst +++ b/configuration.rst @@ -8,8 +8,8 @@ Every Symfony application consists of a collection of bundles that add useful to (:doc:`services `) to your project. Each bundle can be customized via configuration files that live - by default - in the ``app/config`` directory. -Configuration: config.yml -------------------------- +Configuration: ``config.yml`` +----------------------------- The main configuration file is called ``config.yml``: @@ -297,8 +297,8 @@ a controller - see :ref:`service-container-parameters`. .. _config-parameters-yml: -The Special parameters.yml File -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The Special ``parameters.yml`` File +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On the surface, ``parameters.yml`` is just like any other configuration file: it is imported by ``config.yml`` and defines several parameters: diff --git a/configuration/external_parameters.rst b/configuration/external_parameters.rst index 632e9b851bd..367ec2bc331 100644 --- a/configuration/external_parameters.rst +++ b/configuration/external_parameters.rst @@ -96,7 +96,7 @@ will be used whenever the corresponding environment variable is *not* found: $container->setParameter('env(DATABASE_HOST)', 'localhost'); Setting environment variables is generally done at the web server level or in the -terminal. If you're using Apache, Nginx or just the console, you can use e.g. one +terminal. If you're using Apache, nginx or just the console, you can use e.g. one of the following: .. configuration-block:: diff --git a/contributing/code/bugs.rst b/contributing/code/bugs.rst index 2a374dedbba..440b2dac519 100644 --- a/contributing/code/bugs.rst +++ b/contributing/code/bugs.rst @@ -15,7 +15,7 @@ Before submitting a bug: framework; * Ask for assistance on `Stack Overflow`_, on the #support channel of - `the Symfony Slack`_ or on the #symfony `IRC channel`_ if you're not sure if + `the Symfony Slack`_ or on the ``#symfony`` `IRC channel`_ if you're not sure if your issue really is a bug. If your problem definitely looks like a bug, report it using the official bug diff --git a/contributing/code/core_team.rst b/contributing/code/core_team.rst index 2f89eea7052..3601d5b3fcd 100644 --- a/contributing/code/core_team.rst +++ b/contributing/code/core_team.rst @@ -148,7 +148,7 @@ A pull request **can be merged** if: * Enough time was given for peer reviews; * At least two **Merger Team** members voted ``+1`` (only one if the submitter - is part of the Merger team) and no Core member voted ``-1`` (via Github + is part of the Merger team) and no Core member voted ``-1`` (via GitHub reviews or as comments). Pull Request Merging Process diff --git a/contributing/documentation/format.rst b/contributing/documentation/format.rst index c1a082d31e4..43147f26341 100644 --- a/contributing/documentation/format.rst +++ b/contributing/documentation/format.rst @@ -8,7 +8,7 @@ such as HTML and PDF. reStructuredText ---------------- -reStructuredText is a plaintext markup syntax similar to Markdown, but much +reStructuredText is a plain text markup syntax similar to Markdown, but much stricter with its syntax. If you are new to reStructuredText, take some time to familiarize with this format by reading the existing `Symfony documentation`_ source code. diff --git a/contributing/documentation/overview.rst b/contributing/documentation/overview.rst index 7fd6aa55d5b..0a000dec71c 100644 --- a/contributing/documentation/overview.rst +++ b/contributing/documentation/overview.rst @@ -292,7 +292,7 @@ Why Do my Changes Take so Long to Be Reviewed and/or Merged? Please be patient. It can take up to several days before your pull request can be fully reviewed. After merging the changes, it could take again several hours -before your changes appear on the symfony.com website. +before your changes appear on the ``symfony.com`` website. Why Should I Use the Oldest Maintained Branch Instead of the Master Branch? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/contributing/documentation/standards.rst b/contributing/documentation/standards.rst index 7edd66ab061..08787eb0331 100644 --- a/contributing/documentation/standards.rst +++ b/contributing/documentation/standards.rst @@ -63,8 +63,8 @@ Code Examples * To avoid horizontal scrolling on code blocks, we prefer to break a line correctly if it crosses the 85th character; * When you fold one or more lines of code, place ``...`` in a comment at the point - of the fold. These comments are: ``// ...`` (php), ``# ...`` (yaml/bash), ``{# ... #}`` - (twig), ```` (xml/html), ``; ...`` (ini), ``...`` (text); + of the fold. These comments are: ``// ...`` (PHP), ``# ...`` (Yaml/bash), ``{# ... #}`` + (Twig), ```` (XML/HTML), ``; ...`` (INI), ``...`` (text); * When you fold a part of a line, e.g. a variable value, put ``...`` (without comment) at the place of the fold; * Description of the folded code: (optional) diff --git a/controller/soap_web_service.rst b/controller/soap_web_service.rst index 6d1bd2a3be4..a4447c46a5e 100644 --- a/controller/soap_web_service.rst +++ b/controller/soap_web_service.rst @@ -89,7 +89,7 @@ Take note of the calls to ``ob_start()`` and ``ob_get_clean()``. These methods control `output buffering`_ which allows you to "trap" the echoed output of ``$server->handle()``. This is necessary because Symfony expects your controller to return a ``Response`` object with the output as its "content". -You must also remember to set the "Content-Type" header to "text/xml", as +You must also remember to set the ``"Content-Type"`` header to ``"text/xml"``, as this is what the client will expect. So, you use ``ob_start()`` to start buffering the STDOUT and use ``ob_get_clean()`` to dump the echoed output into the content of the Response and clear the output buffer. Finally, you're diff --git a/create_framework/introduction.rst b/create_framework/introduction.rst index 98ae23d3252..d4d9742fee9 100644 --- a/create_framework/introduction.rst +++ b/create_framework/introduction.rst @@ -62,7 +62,7 @@ Before You Start Reading about how to create a framework is not enough. You will have to follow along and actually type all the examples included in this tutorial. For that, you need a recent version of PHP (5.5.9 or later is good enough), a web server -(like Apache, NGinx or PHP's built-in web server), a good knowledge of PHP and +(like Apache, NGINX or PHP's built-in web server), a good knowledge of PHP and an understanding of Object Oriented programming. Ready to go? Read on! diff --git a/create_framework/routing.rst b/create_framework/routing.rst index 628a8a04d39..717ed1068fb 100644 --- a/create_framework/routing.rst +++ b/create_framework/routing.rst @@ -73,7 +73,7 @@ of default values for route attributes (``['name' => 'World']``). Read the :doc:`Routing component documentation ` to learn more about its many features like URL generation, attribute - requirements, HTTP method enforcements, loaders for YAML or XML files, + requirements, HTTP method enforcement, loaders for YAML or XML files, dumpers to PHP or Apache rewrite rules for enhanced performance and much more. diff --git a/deployment/azure-website.rst b/deployment/azure-website.rst index c758c239d1e..71c7cd288a1 100644 --- a/deployment/azure-website.rst +++ b/deployment/azure-website.rst @@ -65,7 +65,7 @@ application code to the Git repository. :alt: Configure Azure Website credentials Congratulations! Your Azure Website is now up and running. You can check -it by browsing to the Website url you configured in the first step. You should +it by browsing to the website URL you configured in the first step. You should see the following display in your web browser: .. image:: /_images/deployment/azure-website/step-05.png @@ -117,8 +117,8 @@ the web server. .. image:: /_images/deployment/azure-website/step-08.png :alt: OPCache Configuration -Tweaking php.ini Configuration Settings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Tweaking ``php.ini`` Configuration Settings +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Microsoft Azure allows you to override the ``php.ini`` global configuration settings by creating a custom ``.user.ini`` file under the project root diff --git a/deployment/fortrabbit.rst b/deployment/fortrabbit.rst index ad1ca05aacf..31195949912 100644 --- a/deployment/fortrabbit.rst +++ b/deployment/fortrabbit.rst @@ -182,7 +182,7 @@ Environment Variables ~~~~~~~~~~~~~~~~~~~~~ Set the ``SYMFONY_ENV`` environment variable to ``prod`` to make sure the right -config files get loaded. ENV vars are configuable in fortrabbit Dashboard as well. +config files get loaded. ENV vars are configurable in fortrabbit Dashboard as well. Document Root ~~~~~~~~~~~~~ @@ -198,7 +198,7 @@ It is assumed that your codebase is under version-control with Git and dependenc are managed with Composer (locally). Every time you push to fortrabbit composer install runs before your code gets -deployed. To finetune the deployment behavior put a `fortrabbit.yml`_. deployment +deployed. To fine-tune the deployment behavior put a `fortrabbit.yml`_. deployment file (optional) in the project root. Add fortrabbit as a (additional) Git remote and add your configuration changes: diff --git a/deployment/heroku.rst b/deployment/heroku.rst index 1fe7748e35a..fbef77703b2 100644 --- a/deployment/heroku.rst +++ b/deployment/heroku.rst @@ -98,7 +98,7 @@ directory of the application and add just the following content: .. note:: - If you prefer to use Nginx, which is also available on Heroku, you can create + If you prefer to use nginx, which is also available on Heroku, you can create a configuration file for it and point to it from your Procfile as described in the `Heroku documentation`_: diff --git a/deployment/proxies.rst b/deployment/proxies.rst index 9015a7165a5..cb2c52718c0 100644 --- a/deployment/proxies.rst +++ b/deployment/proxies.rst @@ -18,8 +18,8 @@ via HTTPS, the client's port and the hostname being requested. .. _request-set-trusted-proxies: -Solution: setTrustedProxies() ------------------------------ +Solution: ``setTrustedProxies()`` +--------------------------------- To fix this, you need to tell Symfony which reverse proxy IP addresses to trust and what headers your reverse proxy uses to send information:: diff --git a/doctrine/associations.rst b/doctrine/associations.rst index bf3b618f6c6..24a333c8a36 100644 --- a/doctrine/associations.rst +++ b/doctrine/associations.rst @@ -189,10 +189,10 @@ own a collection of its related ``Product`` objects. .. tip:: - The targetEntity value in the metadata used above can reference any entity + The ``targetEntity`` value in the metadata used above can reference any entity with a valid namespace, not just entities defined in the same namespace. To relate to an entity defined in a different class or bundle, enter a full - namespace as the targetEntity. + namespace as the ``targetEntity``. Now that you've added new properties to both the ``Product`` and ``Category`` classes, you must generate the missing getter and setter methods manually or diff --git a/doctrine/custom_dql_functions.rst b/doctrine/custom_dql_functions.rst index ad3a9bfc7e7..f8af5f86403 100644 --- a/doctrine/custom_dql_functions.rst +++ b/doctrine/custom_dql_functions.rst @@ -79,7 +79,7 @@ In Symfony, you can register your custom DQL functions as follows: .. note:: In case the ``entity_managers`` were named explicitly, configuring the functions with the - orm directly will trigger the exception `Unrecognized option "dql" under "doctrine.orm"`. + ORM directly will trigger the exception ``Unrecognized option "dql" under "doctrine.orm"``. The ``dql`` configuration block must be defined under the named entity manager. .. configuration-block:: diff --git a/email/spool.rst b/email/spool.rst index 040544c828c..ca7b89a76fd 100644 --- a/email/spool.rst +++ b/email/spool.rst @@ -21,7 +21,7 @@ Spool Using Memory When you use spooling to store the emails to memory, they will get sent right before the kernel terminates. This means the email only gets sent if the whole request got executed without any unhandled exception or any errors. To configure -swiftmailer with the memory option, use the following configuration: +Swift Mailer with the memory option, use the following configuration: .. configuration-block:: @@ -63,7 +63,7 @@ Spool Using Files When you use the filesystem for spooling, Symfony creates a folder in the given path for each mail service (e.g. "default" for the default service). This folder will contain files for each email in the spool. So make sure this directory is -writable by Symfony (or your webserver/php)! +writable by Symfony (or your webserver/PHP)! In order to use the spool with files, use the following configuration: @@ -145,7 +145,7 @@ interval. .. caution:: - When you create a message with SwiftMailer, it generates a ``Swift_Message`` + When you create a message with Swift Mailer, it generates a ``Swift_Message`` class. If the ``swiftmailer`` service is lazy loaded, it generates instead a proxy class named ``Swift_Message_``. diff --git a/event_dispatcher/before_after_filters.rst b/event_dispatcher/before_after_filters.rst index 98bb86d8c33..4b5a36bd401 100644 --- a/event_dispatcher/before_after_filters.rst +++ b/event_dispatcher/before_after_filters.rst @@ -174,7 +174,7 @@ After Filters with the ``kernel.response`` Event In addition to having a "hook" that's executed *before* your controller, you can also add a hook that's executed *after* your controller. For this example, -imagine that you want to add a sha1 hash (with a salt using that token) to +imagine that you want to add a ``sha1`` hash (with a salt using that token) to all responses that have passed this token authentication. Another core Symfony event - called ``kernel.response`` (aka ``KernelEvents::RESPONSE``) - diff --git a/form/csrf_protection.rst b/form/csrf_protection.rst index b46de4e67e9..8ad04acf224 100644 --- a/form/csrf_protection.rst +++ b/form/csrf_protection.rst @@ -21,7 +21,7 @@ Symfony automatically validates the presence and accuracy of this token. The ``_token`` field is a hidden field and will be automatically rendered if you include the ``form_end()`` function in your template, which ensures -that all un-rendered fields are output. +that all unrendered fields are output. .. caution:: diff --git a/form/data_transformers.rst b/form/data_transformers.rst index 5beffdd2282..5ad3d017739 100644 --- a/form/data_transformers.rst +++ b/form/data_transformers.rst @@ -7,7 +7,7 @@ How to Use Data Transformers Data transformers are used to translate the data for a field into a format that can be displayed in a form (and back on submit). They're already used internally for many field types. For example, the :doc:`DateType ` field -can be rendered as a ``yyyy-MM-dd``-formatted input textbox. Internally, a data transformer +can be rendered as a ``yyyy-MM-dd``-formatted input text box. Internally, a data transformer converts the starting ``DateTime`` value of the field into the ``yyyy-MM-dd`` string to render the form, and then back into a ``DateTime`` object on submit. @@ -120,9 +120,9 @@ Harder Example: Transforming an Issue Number into an Issue Entity ----------------------------------------------------------------- Say you have a many-to-one relation from the Task entity to an Issue entity (i.e. each -Task has an optional foreign key to its related Issue). Adding a listbox with all +Task has an optional foreign key to its related Issue). Adding a list box with all possible issues could eventually get *really* long and take a long time to load. -Instead, you decide you want to add a textbox, where the user can enter the issue number. +Instead, you decide you want to add a text box, where the user can enter the issue number. Start by setting up the text field like normal:: diff --git a/form/form_themes.rst b/form/form_themes.rst index bc0b1140e8a..9085e2031e2 100644 --- a/form/form_themes.rst +++ b/form/form_themes.rst @@ -132,10 +132,10 @@ Template Fragment Inheritance In some cases, the fragment you want to customize will appear to be missing. For example, there is no ``textarea_errors`` fragment in the default themes -provided with Symfony. So how are the errors for a textarea field rendered? +provided with Symfony. So how are the errors for a ``textarea`` field rendered? The answer is: via the ``form_errors`` fragment. When Symfony renders the errors -for a textarea type, it looks first for a ``textarea_errors`` fragment before +for a ``textarea`` type, it looks first for a ``textarea_errors`` fragment before falling back to the ``form_errors`` fragment. Each field type has a *parent* type (the parent type of ``textarea`` is ``text``, its parent is ``form``), and Symfony uses the fragment for the parent type if the base fragment doesn't diff --git a/frontend/encore/babel.rst b/frontend/encore/babel.rst index f7cba9a4892..a312fd60174 100644 --- a/frontend/encore/babel.rst +++ b/frontend/encore/babel.rst @@ -49,8 +49,8 @@ cache directory: # On Unix run this command. On Windows, clear this directory manually $ rm -rf node_modules/.cache/babel-loader/ -Creating a .babelrc File ------------------------- +Creating a ``.babelrc`` File +---------------------------- Instead of calling ``configureBabel()``, you could create a ``.babelrc`` file at the root of your project. This is a more "standard" way of configuring diff --git a/frontend/encore/postcss.rst b/frontend/encore/postcss.rst index e80f1f7d3c0..a6690bdf666 100644 --- a/frontend/encore/postcss.rst +++ b/frontend/encore/postcss.rst @@ -56,8 +56,8 @@ You can also pass options to the `postcss-loader`_ by passing a callback: .. _browserslist_package_config: -Adding browserslist to package.json ------------------------------------ +Adding browserslist to ``package.json`` +--------------------------------------- The ``autoprefixer`` (and many other tools) need to know what browsers you want to support. The best-practice is to configure this directly in your ``package.json`` diff --git a/frontend/encore/sourcemaps.rst b/frontend/encore/sourcemaps.rst index e46151a5e7f..62d4c6a351b 100644 --- a/frontend/encore/sourcemaps.rst +++ b/frontend/encore/sourcemaps.rst @@ -6,7 +6,8 @@ asset (e.g. the Sass code that was compiled to CSS or the TypeScript code that was compiled to JavaScript). Source maps are useful for debugging purposes but unnecessary when executing the application in production. -Encore's default ``webpack.config.js`` file enables sourcemaps in the ``dev`` build: +Encore's default ``webpack.config.js`` file enables source maps in the ``dev`` +build: .. code-block:: javascript diff --git a/frontend/encore/versioning.rst b/frontend/encore/versioning.rst index 79d06fabf9c..8776cda0ca8 100644 --- a/frontend/encore/versioning.rst +++ b/frontend/encore/versioning.rst @@ -25,8 +25,8 @@ To link to these assets, Encore creates two files ``entrypoints.json`` and .. _load-manifest-files: -Loading Assets from entrypoints.json & manifest.json ----------------------------------------------------- +Loading Assets from ``entrypoints.json`` & ``manifest.json`` +------------------------------------------------------------ Whenever you run Encore, two configuration files are generated: ``entrypoints.json`` and ``manifest.json``. Each file is similar, and contains a map to the final, versioned diff --git a/frontend/encore/versus-assetic.rst b/frontend/encore/versus-assetic.rst index 9f606ae48e3..afc2373b2b7 100644 --- a/frontend/encore/versus-assetic.rst +++ b/frontend/encore/versus-assetic.rst @@ -8,26 +8,26 @@ still works well. So what are the differences between Assetic and Encore? -+--------------------------+-------------------------------+-------------------------+ -| | Assetic | Encore + -+--------------------------+-------------------------------+-------------------------+ -| Language | Pure PHP, relies on other | Node.js | -| | language tools for some tasks | | -+--------------------------+-------------------------------+-------------------------+ -| Combine assets? | Yes | Yes | -+--------------------------+-------------------------------+-------------------------+ -| Minify assets? | Yes (when configured) | Yes (out-of-the-box) | -+--------------------------+-------------------------------+-------------------------+ -| Process Sass/Less? | Yes | Yes | -+--------------------------+-------------------------------+-------------------------+ -| Loads JS Modules? [1]_ | No | Yes | -+--------------------------+-------------------------------+-------------------------+ -| Load CSS Deps in JS? [1] | No | Yes | -+--------------------------+-------------------------------+-------------------------+ -| React, Vue.js support? | No [2]_ | Yes | -+--------------------------+-------------------------------+-------------------------+ -| Support | Not actively maintained | Actively maintained | -+--------------------------+-------------------------------+-------------------------+ ++----------------------------------+-------------------------------+-------------------------+ +| | Assetic | Encore + ++----------------------------------+-------------------------------+-------------------------+ +| Language | Pure PHP, relies on other | Node.js | +| | language tools for some tasks | | ++----------------------------------+-------------------------------+-------------------------+ +| Combine assets? | Yes | Yes | ++----------------------------------+-------------------------------+-------------------------+ +| Minify assets? | Yes (when configured) | Yes (out-of-the-box) | ++----------------------------------+-------------------------------+-------------------------+ +| Process Sass/Less? | Yes | Yes | ++----------------------------------+-------------------------------+-------------------------+ +| Loads JS Modules? [1]_ | No | Yes | ++----------------------------------+-------------------------------+-------------------------+ +| Load CSS dependencies in JS? [1] | No | Yes | ++----------------------------------+-------------------------------+-------------------------+ +| React, Vue.js support? | No [2]_ | Yes | ++----------------------------------+-------------------------------+-------------------------+ +| Support | Not actively maintained | Actively maintained | ++----------------------------------+-------------------------------+-------------------------+ .. [1] JavaScript modules allow you to organize your JavaScript into small files called modules and import them: diff --git a/frontend/encore/vuejs.rst b/frontend/encore/vuejs.rst index 191bb50324e..a92fa1b116b 100644 --- a/frontend/encore/vuejs.rst +++ b/frontend/encore/vuejs.rst @@ -1,5 +1,5 @@ -Enabling Vue.js (vue-loader) -============================ +Enabling Vue.js (``vue-loader``) +================================ Want to use `Vue.js`_? No problem! First enable it in ``webpack.config.js``: diff --git a/http_cache/form_csrf_caching.rst b/http_cache/form_csrf_caching.rst index df174616d90..6e031cc5be9 100644 --- a/http_cache/form_csrf_caching.rst +++ b/http_cache/form_csrf_caching.rst @@ -36,5 +36,5 @@ Another option would be to load the form via an uncached AJAX request, but cache the rest of the HTML response. Or you can even load just the CSRF token with an AJAX request and replace the -form field value with it. Take a look at :doc:`hinclude.js ` +form field value with it. Take a look at :doc:`HInclude ` for a nice solution. diff --git a/http_cache/validation.rst b/http_cache/validation.rst index d2f115f149f..68f0ce1c9cf 100644 --- a/http_cache/validation.rst +++ b/http_cache/validation.rst @@ -13,7 +13,7 @@ The validation model addresses this issue. Under this model, the cache continues to store responses. The difference is that, for each request, the cache asks the application if the cached response is still valid or if it needs to be regenerated. If the cache *is* still valid, your application should return a 304 status code -and no content. This tells the cache that it's ok to return the cached response. +and no content. This tells the cache that it's OK to return the cached response. Under this model, you only save CPU if you're able to determine that the cached response is still valid by doing *less* work than generating the whole @@ -48,7 +48,8 @@ An ``ETag`` is like a fingerprint and is used to quickly compare if two different versions of a resource are equivalent. Like fingerprints, each ``ETag`` must be unique across all representations of the same resource. -To see a simple implementation, generate the ETag as the md5 of the content:: +To see a simple implementation, generate the ``ETag`` as the ``md5`` of the +content:: // src/AppBundle/Controller/DefaultController.php namespace AppBundle\Controller; @@ -78,11 +79,11 @@ to 304. When using ``mod_deflate`` or ``mod_brotli`` in Apache 2.4, the original ``ETag`` value is modified (e.g. if ``ETag`` was ``foo``, Apache turns it - into ``foo-gzip`` or ``foo-br``), which breaks the ETag-based validation. + into ``foo-gzip`` or ``foo-br``), which breaks the ``ETag``-based validation. You can control this behavior with the `DeflateAlterETag`_ and `BrotliAlterETag`_ directives. Alternatively, you can use the following Apache configuration to - keep both the original ETag and the modified one when compressing responses: + keep both the original ``ETag`` and the modified one when compressing responses: .. code-block:: apache @@ -96,7 +97,7 @@ to 304. decide whether or not the resource has been updated since it was cached. This algorithm is simple enough and very generic, but you need to create the -whole ``Response`` before being able to compute the ETag, which is sub-optimal. +whole ``Response`` before being able to compute the ``ETag``, which is sub-optimal. In other words, it saves on bandwidth, but not CPU cycles. In the :ref:`optimizing-cache-validation` section, you'll see how validation @@ -105,7 +106,7 @@ doing so much work. .. tip:: - Symfony also supports weak ETags by passing ``true`` as the second + Symfony also supports weak ``ETag``s by passing ``true`` as the second argument to the :method:`Symfony\\Component\\HttpFoundation\\Response::setEtag` method. diff --git a/logging/channels_handlers.rst b/logging/channels_handlers.rst index 11dbd3bdb0f..92d35c073c3 100644 --- a/logging/channels_handlers.rst +++ b/logging/channels_handlers.rst @@ -120,7 +120,7 @@ You can specify the configuration by many forms: Creating your own Channel ------------------------- -You can change the channel monolog logs to one service at a time. This is done +You can change the channel Monolog logs to one service at a time. This is done either via the :ref:`configuration ` below or by tagging your service with :ref:`monolog.logger` and specifying which channel the service should log to. With the tag, the logger diff --git a/logging/monolog_console.rst b/logging/monolog_console.rst index 46bb96f2155..ab9132ee83d 100644 --- a/logging/monolog_console.rst +++ b/logging/monolog_console.rst @@ -49,7 +49,7 @@ The example above could then be rewritten as:: Depending on the verbosity level that the command is run in and the user's configuration (see below), these messages may or may not be displayed to the console. If they are displayed, they are timestamped and colored appropriately. -Additionally, error logs are written to the error output (php://stderr). +Additionally, error logs are written to the error output (``php://stderr``). There is no need to conditionally handle the verbosity settings anymore. The Monolog console handler is enabled by default in the Symfony Framework. For diff --git a/page_creation.rst b/page_creation.rst index c12b5c40757..c1dd58a5de5 100644 --- a/page_creation.rst +++ b/page_creation.rst @@ -235,7 +235,7 @@ What's Next? Congrats! You're already starting to master Symfony and learn a whole new way of building beautiful, functional, fast and maintainable applications. -Ok, time to finish mastering the fundamentals by reading these articles: +OK, time to finish mastering the fundamentals by reading these articles: * :doc:`/routing` * :doc:`/controller` diff --git a/performance.rst b/performance.rst index 5bf927cd07e..1feb0bd4025 100644 --- a/performance.rst +++ b/performance.rst @@ -163,8 +163,8 @@ possible solutions: .. _performance-configure-realpath-cache: -Configure the PHP realpath Cache -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Configure the PHP ``realpath`` Cache +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When a relative path is transformed into its real and absolute path, PHP caches the result to improve performance. Applications that open many PHP files, diff --git a/profiler/data_collector.rst b/profiler/data_collector.rst index 55ae1e42ec3..0898d4d81f9 100644 --- a/profiler/data_collector.rst +++ b/profiler/data_collector.rst @@ -77,7 +77,7 @@ request:: Returns the collector identifier, which must be unique in the application. This value is used later to access the collector information (see :doc:`/testing/profiling`) so it's recommended to return a string which is - short, lowercased and without white spaces. + short, lowercase and without white spaces. .. _data_collector_tag: diff --git a/profiler/storage.rst b/profiler/storage.rst index 78bd45164f0..c4cb202a874 100644 --- a/profiler/storage.rst +++ b/profiler/storage.rst @@ -5,7 +5,7 @@ Switching the Profiler Storage ============================== In Symfony versions prior to 3.0, profiles could be stored in files, databases, -services like Redis and Memcache, etc. Starting from Symfony 3.0, the only storage +services like Redis and memcache, etc. Starting from Symfony 3.0, the only storage mechanism with built-in support is the filesystem. By default, the profile stores the collected data in the ``%kernel.cache_dir%/profiler/`` diff --git a/reference/configuration/assetic.rst b/reference/configuration/assetic.rst index c86b93840e4..4ab48915c01 100644 --- a/reference/configuration/assetic.rst +++ b/reference/configuration/assetic.rst @@ -6,7 +6,7 @@ Assetic Configuration Reference (AsseticBundle) .. include:: /assetic/_standard_edition_warning.rst.inc -You can get the full Asstic configuration reference as follows: +You can get the full Assetic configuration reference as follows: .. code-block:: terminal diff --git a/reference/configuration/debug.rst b/reference/configuration/debug.rst index 3799288e71f..bf23d951ea9 100644 --- a/reference/configuration/debug.rst +++ b/reference/configuration/debug.rst @@ -32,16 +32,20 @@ Configuration * `min_depth`_ * `max_string_length`_ -max_items -~~~~~~~~~ +``max_items`` +~~~~~~~~~~~~~ **type**: ``integer`` **default**: ``2500`` This is the maximum number of items to dump. Setting this option to ``-1`` disables the limit. -min_depth -~~~~~~~~~ +``min_depth`` +~~~~~~~~~~~~~ + +.. versionadded:: 3.4 + + The ``min_depth`` option was introduced in Symfony 3.4. **type**: ``integer`` **default**: ``1`` @@ -50,20 +54,16 @@ be cloned. After this depth is reached, only ``max_items`` items will be cloned. The default value is ``1``, which is consistent with older Symfony versions. -.. versionadded:: 3.4 - - The ``min_depth`` option was introduced in Symfony 3.4. - -max_string_length -~~~~~~~~~~~~~~~~~ +``max_string_length`` +~~~~~~~~~~~~~~~~~~~~~ **type**: ``integer`` **default**: ``-1`` This option configures the maximum string length before truncating the string. The default value (``-1``) means that strings are never truncated. -dump_destination -~~~~~~~~~~~~~~~~ +``dump_destination`` +~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``null`` diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index f06420c5dcc..8f9d402683d 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -247,14 +247,14 @@ Explicit definition of all the mapped entities is the only necessary configuration for the ORM and there are several configuration options that you can control. The following configuration options exist for a mapping: -type -.... +``type`` +........ One of ``annotation``, ``xml``, ``yml``, ``php`` or ``staticphp``. This specifies which type of metadata type your mapping uses. -dir -... +``dir`` +....... Path to the mapping or entity files (depending on the driver). If this path is relative, it is assumed to be relative to the bundle root. This only works @@ -262,8 +262,8 @@ if the name of your mapping is a bundle name. If you want to use this option to specify absolute paths you should prefix the path with the kernel parameters that exist in the DIC (for example ``%kernel.project_dir%``). -prefix -...... +``prefix`` +.......... A common namespace prefix that all entities of this mapping share. This prefix should never conflict with prefixes of other defined mappings otherwise @@ -271,15 +271,15 @@ some of your entities cannot be found by Doctrine. This option defaults to the bundle namespace + ``Entity``, for example for an application bundle called AcmeHelloBundle prefix would be ``Acme\HelloBundle\Entity``. -alias -..... +``alias`` +......... Doctrine offers a way to alias entity namespaces to simpler, shorter names to be used in DQL queries or for Repository access. When using a bundle the alias defaults to the bundle name. -is_bundle -......... +``is_bundle`` +............. This option is a derived value from ``dir`` and by default is set to ``true`` if dir is relative proved by a ``file_exists()`` check that returns ``false``. @@ -437,7 +437,7 @@ Default Value of Dir If ``dir`` is not specified, then its default value depends on which configuration driver is being used. For drivers that rely on the PHP files (annotation, -staticphp) it will be ``[Bundle]/Entity``. For drivers that are using +``staticphp``) it will be ``[Bundle]/Entity``. For drivers that are using configuration files (XML, YAML, ...) it will be ``[Bundle]/Resources/config/doctrine``. diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index b421a6c5d3a..d604127b48e 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -215,8 +215,8 @@ Configuration * `transitions`_ * :ref:`type ` -secret -~~~~~~ +``secret`` +~~~~~~~~~~ **type**: ``string`` **required** @@ -241,8 +241,8 @@ out all the application users. .. _configuration-framework-http_method_override: -http_method_override -~~~~~~~~~~~~~~~~~~~~ +``http_method_override`` +~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` @@ -276,13 +276,13 @@ named ``kernel.http_method_override``. .. _reference-framework-trusted-proxies: -trusted_proxies -~~~~~~~~~~~~~~~ +``trusted_proxies`` +~~~~~~~~~~~~~~~~~~~ The ``trusted_proxies`` option was removed in Symfony 3.3. See :doc:`/deployment/proxies`. -ide -~~~ +``ide`` +~~~~~~~ **type**: ``string`` **default**: ``null`` @@ -364,8 +364,8 @@ need to escape the percent signs (``%``) by doubling them. .. _reference-framework-test: -test -~~~~ +``test`` +~~~~~~~~ **type**: ``boolean`` @@ -380,8 +380,8 @@ setting should be present in your ``test`` environment (usually via .. _config-framework-default_locale: -default_locale -~~~~~~~~~~~~~~ +``default_locale`` +~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``en`` @@ -395,8 +395,8 @@ method. You can read more information about the default locale in :ref:`translation-default-locale`. -trusted_hosts -~~~~~~~~~~~~~ +``trusted_hosts`` +~~~~~~~~~~~~~~~~~ **type**: ``array`` | ``string`` **default**: ``[]`` @@ -470,13 +470,13 @@ can respond to any given host. .. _reference-framework-form: -form -~~~~ +``form`` +~~~~~~~~ .. _reference-form-enabled: -enabled -....... +``enabled`` +........... **type**: ``boolean`` **default**: ``false`` @@ -495,8 +495,8 @@ settings is configured. For more details, see :doc:`/forms`. -csrf_protection -~~~~~~~~~~~~~~~ +``csrf_protection`` +~~~~~~~~~~~~~~~~~~~ .. seealso:: @@ -504,8 +504,8 @@ csrf_protection .. _reference-csrf_protection-enabled: -enabled -....... +``enabled`` +........... **type**: ``boolean`` **default**: ``true`` if form support is enabled, ``false`` otherwise @@ -517,8 +517,8 @@ If you're using forms, but want to avoid starting your session (e.g. using forms in an API-only website), ``csrf_protection`` will need to be set to ``false``. -esi -~~~ +``esi`` +~~~~~~~ .. seealso:: @@ -526,8 +526,8 @@ esi .. _reference-esi-enabled: -enabled -....... +``enabled`` +........... **type**: ``boolean`` **default**: ``false`` @@ -566,8 +566,8 @@ You can also set ``esi`` to ``true`` to enable it: 'esi' => true, ]); -fragments -~~~~~~~~~ +``fragments`` +~~~~~~~~~~~~~ .. seealso:: @@ -576,8 +576,8 @@ fragments .. _reference-fragments-enabled: -enabled -....... +``enabled`` +........... **type**: ``boolean`` **default**: ``false`` @@ -589,21 +589,21 @@ is configured. .. _reference-fragments-path: -path -.... +``path`` +........ **type**: ``string`` **default**: ``'/_fragment'`` The path prefix for fragments. The fragment listener will only be executed when the request starts with this path. -profiler -~~~~~~~~ +``profiler`` +~~~~~~~~~~~~ .. _reference-profiler-enabled: -enabled -....... +``enabled`` +........... **type**: ``boolean`` **default**: ``false`` @@ -617,8 +617,8 @@ and ``test`` environments. the :doc:`WebProfilerBundle configuration ` on how to disable/enable the toolbar. -collect -....... +``collect`` +........... **type**: ``boolean`` **default**: ``true`` @@ -630,24 +630,24 @@ and activate the data collectors manually:: $profiler->enable(); -only_exceptions -............... +``only_exceptions`` +................... **type**: ``boolean`` **default**: ``false`` When this is set to ``true``, the profiler will only be enabled when an exception is thrown during the handling of the request. -only_master_requests -.................... +``only_master_requests`` +........................ **type**: ``boolean`` **default**: ``false`` When this is set to ``true``, the profiler will only be enabled on the master requests (and not on the subrequests). -dsn -... +``dsn`` +....... **type**: ``string`` **default**: ``'file:%kernel.cache_dir%/profiler'`` @@ -658,8 +658,8 @@ The DSN where to store the profiling information. See :doc:`/profiler/storage` for more information about the profiler storage. -matcher -....... +``matcher`` +........... .. caution:: @@ -673,8 +673,8 @@ instance, based on the `ip`_ or :ref:`path `. See :doc:`/profiler/matchers` for more information about using matchers to enable/disable the profiler. -ip -"" +``ip`` +"""""" **type**: ``string`` @@ -682,25 +682,25 @@ If set, the profiler will only be enabled when the current IP address matches. .. _reference-profiler-matcher-path: -path -"""" +``path`` +"""""""" **type**: ``string`` If set, the profiler will only be enabled when the current path matches. -service -""""""" +``service`` +""""""""""" **type**: ``string`` This setting contains the service id of a custom matcher. -request -~~~~~~~ +``request`` +~~~~~~~~~~~ -formats -....... +``formats`` +........... **type**: ``array`` **default**: ``[]`` @@ -759,11 +759,11 @@ To configure a ``jsonp`` format: ], ]); -router -~~~~~~ +``router`` +~~~~~~~~~~ -resource -........ +``resource`` +............ **type**: ``string`` **required** @@ -772,8 +772,8 @@ routes and imports the router should load. .. _reference-router-type: -type -.... +``type`` +........ **type**: ``string`` @@ -781,22 +781,22 @@ The type of the resource to hint the loaders about the format. This isn't needed when you use the default routers with the expected file extensions (``.xml``, ``.yml`` / ``.yaml``, ``.php``). -http_port -......... +``http_port`` +............. **type**: ``integer`` **default**: ``80`` The port for normal http requests (this is used when matching the scheme). -https_port -.......... +``https_port`` +.............. **type**: ``integer`` **default**: ``443`` The port for https requests (this is used when matching the scheme). -strict_requirements -................... +``strict_requirements`` +....................... **type**: ``mixed`` **default**: ``true`` @@ -818,11 +818,11 @@ The value can be one of: ``true`` is recommended in the development environment, while ``false`` or ``null`` might be preferred in production. -session -~~~~~~~ +``session`` +~~~~~~~~~~~ -storage_id -.......... +``storage_id`` +.............. **type**: ``string`` **default**: ``'session.storage.native'`` @@ -830,8 +830,8 @@ The service id used for session storage. The ``session.storage`` service alias will be set to this service id. This class has to implement :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface`. -handler_id -.......... +``handler_id`` +.............. **type**: ``string`` **default**: ``'session.handler.native_file'`` @@ -848,8 +848,8 @@ installation. .. _name: -name -.... +``name`` +........ **type**: ``string`` **default**: ``null`` @@ -857,8 +857,8 @@ This specifies the name of the session cookie. By default, it will use the cookie name which is defined in the ``php.ini`` with the ``session.name`` directive. -cookie_lifetime -............... +``cookie_lifetime`` +................... **type**: ``integer`` **default**: ``null`` @@ -867,16 +867,16 @@ This determines the lifetime of the session - in seconds. The default value will be used. Setting this value to ``0`` means the cookie is valid for the length of the browser session. -cookie_path -........... +``cookie_path`` +............... **type**: ``string`` **default**: ``/`` This determines the path to set in the session cookie. By default, it will use ``/``. -cache_limiter -............. +``cache_limiter`` +................. **type**: ``string`` or ``int`` **default**: ``''`` @@ -919,8 +919,8 @@ Unlike the other session options, ``cache_limiter`` is set as a regular 'cache_limiter' => 0, ]); -cookie_domain -............. +``cookie_domain`` +................. **type**: ``string`` **default**: ``''`` @@ -928,15 +928,15 @@ This determines the domain to set in the session cookie. By default, it's blank, meaning the host name of the server which generated the cookie according to the cookie specification. -cookie_secure -............. +``cookie_secure`` +................. **type**: ``boolean`` **default**: ``false`` This determines whether cookies should only be sent over secure connections. -cookie_httponly -............... +``cookie_httponly`` +................... **type**: ``boolean`` **default**: ``true`` @@ -945,15 +945,15 @@ protocol. This means that the cookie won't be accessible by scripting languages, such as JavaScript. This setting can effectively help to reduce identity theft through XSS attacks. -gc_divisor -.......... +``gc_divisor`` +.............. **type**: ``integer`` **default**: ``100`` See `gc_probability`_. -gc_probability -.............. +``gc_probability`` +.................. **type**: ``integer`` **default**: ``1`` @@ -962,8 +962,8 @@ started on every session initialization. The probability is calculated by using ``gc_probability`` / ``gc_divisor``, e.g. 1/100 means there is a 1% chance that the GC process will start on each request. -gc_maxlifetime -.............. +``gc_maxlifetime`` +.................. **type**: ``integer`` **default**: ``1440`` @@ -971,8 +971,8 @@ This determines the number of seconds after which data will be seen as "garbage" and potentially cleaned up. Garbage collection may occur during session start and depends on `gc_divisor`_ and `gc_probability`_. -save_path -......... +``save_path`` +............. **type**: ``string`` **default**: ``%kernel.cache_dir%/sessions`` @@ -1019,8 +1019,8 @@ setting the value to ``null``: .. _reference-session-metadata-update-threshold: -metadata_update_threshold -......................... +``metadata_update_threshold`` +............................. **type**: ``integer`` **default**: ``0`` @@ -1033,8 +1033,8 @@ changed. Previously, you needed to set this option to avoid that behavior. .. _reference-session-enabled: -enabled -....... +``enabled`` +........... **type**: ``boolean`` **default**: ``true`` @@ -1074,8 +1074,8 @@ Whether to enable the session support in the framework. ], ]); -use_cookies -........... +``use_cookies`` +............... **type**: ``boolean`` **default**: ``null`` @@ -1083,13 +1083,13 @@ This specifies if the session ID is stored on the client side using cookies or not. By default, it will use the value defined in the ``php.ini`` with the ``session.use_cookies`` directive. -assets -~~~~~~ +``assets`` +~~~~~~~~~~ .. _reference-assets-base-path: -base_path -......... +``base_path`` +............. **type**: ``string`` @@ -1134,8 +1134,8 @@ This option allows you to define a base path to be used for assets: .. _reference-templating-base-urls: .. _reference-assets-base-urls: -base_urls -......... +``base_urls`` +............. **type**: ``array`` @@ -1182,8 +1182,8 @@ collection each time it generates an asset's path: .. _reference-framework-assets-packages: -packages -........ +``packages`` +............ You can group assets into packages, to specify different base URLs for them: @@ -1251,8 +1251,8 @@ Each package can configure the following options: .. _reference-framework-assets-version: .. _ref-framework-assets-version: -version -....... +``version`` +........... **type**: ``string`` @@ -1326,8 +1326,8 @@ option. .. _reference-templating-version-format: .. _reference-assets-version-format: -version_format -.............. +``version_format`` +.................. **type**: ``string`` **default**: ``%%s?%%s`` @@ -1366,8 +1366,8 @@ is set to ``5``, the asset's path would be ``/images/logo.png?version=5``. .. _reference-assets-version-strategy: .. _reference-templating-version-strategy: -version_strategy -................ +``version_strategy`` +.................... **type**: ``string`` **default**: ``null`` @@ -1453,8 +1453,8 @@ individually for each asset package: .. _reference-assets-json-manifest-path: .. _reference-templating-json-manifest-path: -json_manifest_path -.................. +``json_manifest_path`` +...................... **type**: ``string`` **default**: ``null`` @@ -1550,11 +1550,11 @@ package: If you request an asset that is *not found* in the ``manifest.json`` file, the original - *unmodified* - asset path will be returned. -templating -~~~~~~~~~~ +``templating`` +~~~~~~~~~~~~~~ -hinclude_default_template -......................... +``hinclude_default_template`` +............................. **type**: ``string`` **default**: ``null`` @@ -1563,17 +1563,17 @@ is disabled. This can be either a template name or the content itself. .. seealso:: - See :doc:`/templating/hinclude` for more information about hinclude. + See :doc:`/templating/hinclude` for more information about HInclude. .. _reference-templating-form: -form -.... +``form`` +........ .. _reference-templating-form-resources: -resources -""""""""" +``resources`` +""""""""""""" **type**: ``string[]`` **default**: ``['FrameworkBundle:Form']`` @@ -1645,8 +1645,8 @@ Assume you have custom global form themes in .. _reference-templating-cache: -cache -..... +``cache`` +......... **type**: ``string`` @@ -1658,8 +1658,8 @@ is disabled. When using Twig templating, the caching is already handled by the TwigBundle and doesn't need to be enabled for the FrameworkBundle. -engines -....... +``engines`` +........... **type**: ``string[]`` / ``string`` **required** @@ -1668,8 +1668,8 @@ engine is configured) or an array of engines. At least one engine is required. -loaders -....... +``loaders`` +........... **type**: ``string[]`` @@ -1678,13 +1678,13 @@ templating loaders. Templating loaders are used to find and load templates from a resource (e.g. a filesystem or database). Templating loaders must implement :class:`Symfony\\Component\\Templating\\Loader\\LoaderInterface`. -translator -~~~~~~~~~~ +``translator`` +~~~~~~~~~~~~~~ .. _reference-translator-enabled: -enabled -....... +``enabled`` +........... **type**: ``boolean`` **default**: ``false`` @@ -1692,8 +1692,8 @@ Whether or not to enable the ``translator`` service in the service container. .. _fallback: -fallbacks -......... +``fallbacks`` +............. **type**: ``string|array`` **default**: ``['en']`` @@ -1706,8 +1706,8 @@ found. .. _reference-framework-translator-logging: -logging -....... +``logging`` +........... **default**: ``true`` when the debug mode is enabled, ``false`` otherwise. @@ -1718,8 +1718,8 @@ locale and the ``warning`` level if there is no translation to use at all. .. _reference-framework-translator-formatter: -formatter -......... +``formatter`` +............. **type**: ``string`` **default**: ``translator.formatter.default`` @@ -1732,8 +1732,8 @@ must implement the :class:`Symfony\\Component\\Translation\\Formatter\\MessageFo .. _reference-translator-paths: -paths -..... +``paths`` +......... **type**: ``array`` **default**: ``[]`` @@ -1742,8 +1742,8 @@ for translation files. .. _reference-translator-default_path: -default_path -............ +``default_path`` +................ .. versionadded:: 3.4 @@ -1754,11 +1754,11 @@ default_path This option allows to define the path where the application translations files are stored. -property_access -~~~~~~~~~~~~~~~ +``property_access`` +~~~~~~~~~~~~~~~~~~~ -magic_call -.......... +``magic_call`` +.............. **type**: ``boolean`` **default**: ``false`` @@ -1766,31 +1766,31 @@ When enabled, the ``property_accessor`` service uses PHP's :ref:`magic __call() method ` when its ``getValue()`` method is called. -throw_exception_on_invalid_index -................................ +``throw_exception_on_invalid_index`` +.................................... **type**: ``boolean`` **default**: ``false`` When enabled, the ``property_accessor`` service throws an exception when you try to access an invalid index of an array. -property_info -~~~~~~~~~~~~~ +``property_info`` +~~~~~~~~~~~~~~~~~ .. _reference-property-info-enabled: -enabled -....... +``enabled`` +........... **type**: ``boolean`` **default**: ``false`` -validation -~~~~~~~~~~ +``validation`` +~~~~~~~~~~~~~~ .. _reference-validation-enabled: -enabled -....... +``enabled`` +........... **type**: ``boolean`` **default**: ``true`` if :ref:`form support is enabled `, ``false`` otherwise @@ -1802,8 +1802,8 @@ settings is configured. .. _reference-validation-cache: -cache -..... +``cache`` +......... **type**: ``string`` @@ -1815,23 +1815,23 @@ cache provide from the Doctrine project. .. _reference-validation-enable_annotations: -enable_annotations -.................. +``enable_annotations`` +...................... **type**: ``boolean`` **default**: ``false`` If this option is enabled, validation constraints can be defined using annotations. -translation_domain -.................. +``translation_domain`` +...................... **type**: ``string`` **default**: ``validators`` The translation domain that is used when translating validation constraint error messages. -static_method -............. +``static_method`` +................. **type**: ``string | array`` **default**: ``['loadValidatorMetadata']`` @@ -1840,8 +1840,8 @@ metadata of the class. You can define an array of strings with the names of several methods. In that case, all of them will be called in that order to load the metadata. -strict_email -............ +``strict_email`` +................ **type**: ``Boolean`` **default**: ``false`` @@ -1851,26 +1851,26 @@ the validator uses a simple regular expression to validate email addresses. .. _reference-validation-mapping: -mapping -....... +``mapping`` +........... .. _reference-validation-mapping-paths: -paths -""""" +``paths`` +""""""""" **type**: ``array`` **default**: ``[]`` This option allows to define an array of paths with files or directories where the component will look for additional validation files. -annotations -~~~~~~~~~~~ +``annotations`` +~~~~~~~~~~~~~~~ .. _reference-annotations-cache: -cache -..... +``cache`` +......... **type**: ``string`` **default**: ``'file'`` @@ -1883,16 +1883,16 @@ none a service id A service id referencing a `Doctrine Cache`_ implementation -file_cache_dir -.............. +``file_cache_dir`` +.................. **type**: ``string`` **default**: ``'%kernel.cache_dir%/annotations'`` The directory to store cache files for annotations, in case ``annotations.cache`` is set to ``'file'``. -debug -..... +``debug`` +......... **type**: ``boolean`` **default**: ``%kernel.debug%`` @@ -1904,13 +1904,13 @@ default value. .. _configuration-framework-serializer: -serializer -~~~~~~~~~~ +``serializer`` +~~~~~~~~~~~~~~ .. _reference-serializer-enabled: -enabled -....... +``enabled`` +........... **type**: ``boolean`` **default**: ``false`` @@ -1918,8 +1918,8 @@ Whether to enable the ``serializer`` service or not in the service container. .. _reference-serializer-cache: -cache -..... +``cache`` +......... **type**: ``string`` @@ -1932,8 +1932,8 @@ has to implement the ``Doctrine\Common\Cache\Cache`` interface. .. _reference-serializer-enable_annotations: -enable_annotations -.................. +``enable_annotations`` +...................... **type**: ``boolean`` **default**: ``false`` @@ -1945,8 +1945,8 @@ If this option is enabled, serialization groups can be defined using annotations .. _reference-serializer-name_converter: -name_converter -.............. +``name_converter`` +.................. **type**: ``string`` @@ -1962,8 +1962,8 @@ value. .. _reference-serializer-circular_reference_handler: -circular_reference_handler -.......................... +``circular_reference_handler`` +.............................. **type** ``string`` @@ -1978,24 +1978,24 @@ method. .. _reference-serializer-mapping: -mapping -....... +``mapping`` +........... .. _reference-serializer-mapping-paths: -paths -""""" +``paths`` +""""""""" **type**: ``array`` **default**: ``[]`` This option allows to define an array of paths with files or directories where the component will look for additional serialization files. -php_errors -~~~~~~~~~~ +``php_errors`` +~~~~~~~~~~~~~~ -log -... +``log`` +....... .. versionadded:: 3.2 @@ -2005,8 +2005,8 @@ log Use the application logger instead of the PHP logger for logging PHP errors. -throw -..... +``throw`` +......... .. versionadded:: 3.2 @@ -2019,13 +2019,13 @@ Throw PHP errors as ``\ErrorException`` instances. The parameter .. _reference-cache: -cache -~~~~~ +``cache`` +~~~~~~~~~ .. _reference-cache-app: -app -... +``app`` +....... **type**: ``string`` **default**: ``cache.adapter.filesystem`` @@ -2043,48 +2043,48 @@ ships with multiple adapters: ``cache.adapter.apcu``, ``cache.adapter.doctrine`` .. _reference-cache-system: -system -...... +``system`` +.......... **type**: ``string`` **default**: ``cache.adapter.system`` The cache adapter used by the ``cache.system`` service. It supports the same adapters available for the ``cache.app`` service. -directory -......... +``directory`` +............. **type**: ``string`` **default**: ``%kernel.cache_dir%/pools`` The path to the cache directory used by services inheriting from the ``cache.adapter.filesystem`` adapter (including ``cache.app``). -default_doctrine_provider -......................... +``default_doctrine_provider`` +............................. **type**: ``string`` The service name to use as your default Doctrine provider. The provider is available as the ``cache.default_doctrine_provider`` service. -default_psr6_provider -..................... +``default_psr6_provider`` +......................... **type**: ``string`` The service name to use as your default PSR-6 provider. It is available as the ``cache.default_psr6_provider`` service. -default_redis_provider -...................... +``default_redis_provider`` +.......................... **type**: ``string`` **default**: ``redis://localhost`` The DSN to use by the Redis provider. The provider is available as the ``cache.default_redis_provider`` service. -default_memcached_provider -.......................... +``default_memcached_provider`` +.............................. .. versionadded:: 3.3 @@ -2095,8 +2095,8 @@ default_memcached_provider The DSN to use by the Memcached provider. The provider is available as the ``cache.default_memcached_provider`` service. -pools -..... +``pools`` +......... **type**: ``array`` @@ -2159,8 +2159,8 @@ To configure a Redis cache pool with a default lifetime of 1 hour, do the follow .. _reference-cache-pools-name: -name -"""" +``name`` +"""""""" **type**: ``prototype`` @@ -2170,8 +2170,8 @@ Name of the pool you want to create. Your pool name must differ from ``cache.app`` or ``cache.system``. -adapter -""""""" +``adapter`` +""""""""""" **type**: ``string`` **default**: ``cache.app`` @@ -2184,22 +2184,22 @@ settings from the base pool as defaults. Your service MUST implement the ``Psr\Cache\CacheItemPoolInterface`` interface. -public -"""""" +``public`` +"""""""""" **type**: ``boolean`` **default**: ``false`` Whether your service should be public or not. -default_lifetime -"""""""""""""""" +``default_lifetime`` +"""""""""""""""""""" **type**: ``integer`` Default lifetime of your cache items in seconds. -provider -"""""""" +``provider`` +"""""""""""" **type**: ``string`` @@ -2208,8 +2208,8 @@ use what is configured as ``default_X_provider`` under ``cache``. See the description of the default provider setting above for the type of adapter you use for information on how to specify the provider. -clearer -""""""" +``clearer`` +""""""""""" **type**: ``string`` @@ -2219,8 +2219,8 @@ The cache clearer used to clear your PSR-6 cache. For more information, see :class:`Symfony\\Component\\HttpKernel\\CacheClearer\\Psr6CacheClearer`. -prefix_seed -........... +``prefix_seed`` +............... .. versionadded:: 3.2 @@ -2240,8 +2240,8 @@ example, when warming caches offline). .. _reference-lock: -lock -~~~~ +``lock`` +~~~~~~~~ **type**: ``string`` | ``array`` @@ -2250,8 +2250,8 @@ available, or to ``flock`` otherwise. Store's DSN are also allowed. .. _reference-lock-enabled: -enabled -....... +``enabled`` +........... **type**: ``boolean`` **default**: ``true`` @@ -2260,8 +2260,8 @@ automatically set to ``true`` when one of the child settings is configured. .. _reference-lock-resources: -resources -......... +``resources`` +............. **type**: ``array`` @@ -2349,8 +2349,8 @@ A list of lock stores to be created by the framework extension. .. _reference-lock-resources-name: -name -"""" +``name`` +"""""""" **type**: ``prototype`` @@ -2368,8 +2368,8 @@ Name of the lock you want to create. decorates: lock.invoice.store arguments: ['@lock.invoice.retry.till.save.store.inner', 100, 50] -workflows -~~~~~~~~~ +``workflows`` +~~~~~~~~~~~~~ **type**: ``array`` @@ -2420,8 +2420,8 @@ A list of workflows to be created by the framework extension: .. _reference-workflows-enabled: -enabled -....... +``enabled`` +........... **type**: ``boolean`` **default**: ``false`` @@ -2430,31 +2430,31 @@ automatically set to ``true`` when one of the child settings is configured. .. _reference-workflows-name: -name -.... +``name`` +........ **type**: ``prototype`` Name of the workflow you want to create. -audit_trail -""""""""""" +``audit_trail`` +""""""""""""""" **type**: ``bool`` If set to ``true``, the :class:`Symfony\\Component\\Workflow\\EventListener\\AuditTrailListener` will be enabled. -initial_place -""""""""""""" +``initial_place`` +""""""""""""""""" **type**: ``string`` **default**: ``null`` One of the ``places`` or ``null``. If not null and the supported object is not already initialized via the workflow, this place will be set. -marking_store -""""""""""""" +``marking_store`` +""""""""""""""""" **type**: ``array`` @@ -2465,28 +2465,28 @@ Each marking store can define any of these options: * ``type`` (**type**: ``string`` **possible values**: ``'multiple_state'`` or ``'single_state'``) -places -"""""" +``places`` +"""""""""" **type**: ``array`` All available places (**type**: ``string``) for the workflow configuration. -supports -"""""""" +``supports`` +"""""""""""" **type**: ``string`` | ``array`` The FQCN (fully-qualified class name) of the object supported by the workflow configuration or an array of FQCN if multiple objects are supported. -support_strategy -"""""""""""""""" +``support_strategy`` +"""""""""""""""""""" **type**: ``string`` -transitions -""""""""""" +``transitions`` +""""""""""""""" **type**: ``array`` @@ -2502,8 +2502,8 @@ Each marking store can define any of these options: .. _reference-workflows-type: -type -"""" +``type`` +"""""""" **type**: ``string`` **possible values**: ``'workflow'`` or ``'state_machine'`` diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index 074bb55f68f..99eaa1e5f93 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -45,16 +45,16 @@ separate articles: * `providers`_ * `role_hierarchy`_ -access_denied_url -~~~~~~~~~~~~~~~~~ +``access_denied_url`` +~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``null`` Defines the URL where the user is redirected after a ``403`` HTTP error (unless you define a custom access deny handler). Example: ``/no-permission`` -always_authenticate_before_granting -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``always_authenticate_before_granting`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -62,16 +62,16 @@ If ``true``, the user is asked to authenticate before each call to the ``isGranted()`` method in services and controllers or ``is_granted()`` from templates. -erase_credentials -~~~~~~~~~~~~~~~~~ +``erase_credentials`` +~~~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` If ``true``, the ``eraseCredentials()`` method of the user object is called after authentication. -hide_user_not_found -~~~~~~~~~~~~~~~~~~~ +``hide_user_not_found`` +~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` @@ -83,8 +83,8 @@ If ``false``, the exception thrown is of type :class:`Symfony\\Component\\Security\\Core\\Exception\\UsernameNotFoundException` and it includes the given not found username. -session_fixation_strategy -~~~~~~~~~~~~~~~~~~~~~~~~~ +``session_fixation_strategy`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``SessionAuthenticationStrategy::MIGRATE`` @@ -102,8 +102,8 @@ The possible values of this option are: The entire session is regenerated, so the session ID is updated but all the other session attributes are lost. -access_control --------------- +``access_control`` +------------------ Defines the security protection of the URLs of your application. It's used for example to trigger the user authentication when trying to access to the backend @@ -111,8 +111,8 @@ and to allow anonymous users to the login form page. This option is explained in detail in :doc:`/security/access_control`. -acl ---- +``acl`` +------- This option is used to define `ACL (Access Control List)`_, which allow to associate a list of permissions to an object. This option is deprecated since @@ -122,8 +122,8 @@ Instead of using ACLs, Symfony recommends :doc:`security voters `". -check_path -.......... +``check_path`` +.............. **type**: ``string`` **default**: ``/login_check`` @@ -418,16 +418,16 @@ URL and process the submitted login credentials. Be sure that this URL is covered by your main firewall (i.e. don't create a separate firewall just for ``check_path`` URL). -use_forward -........... +``use_forward`` +............... **type**: ``boolean`` **default**: ``false`` If you'd like the user to be forwarded to the login form instead of being redirected, set this option to ``true``. -username_parameter -.................. +``username_parameter`` +...................... **type**: ``string`` **default**: ``_username`` @@ -435,8 +435,8 @@ This is the field name that you should give to the username field of your login form. When you submit the form to ``check_path``, the security system will look for a POST parameter with this name. -password_parameter -.................. +``password_parameter`` +...................... **type**: ``string`` **default**: ``_password`` @@ -444,8 +444,8 @@ This is the field name that you should give to the password field of your login form. When you submit the form to ``check_path``, the security system will look for a POST parameter with this name. -post_only -......... +``post_only`` +............. **type**: ``boolean`` **default**: ``true`` @@ -455,32 +455,32 @@ request to the ``check_path`` URL. **Options Related to Redirecting after Login** -always_use_default_target_path -.............................. +``always_use_default_target_path`` +.................................. **type**: ``boolean`` **default**: ``false`` If ``true``, users are always redirected to the default target path regardless of the previous URL that was stored in the session. -default_target_path -.................... +``default_target_path`` +........................ **type**: ``string`` **default**: ``/`` The page users are redirected to when there is no previous page stored in the session (for example, when the users browse the login page directly). -target_path_parameter -..................... +``target_path_parameter`` +......................... **type**: ``string`` **default**: ``_target_path`` When using a login form, if you include an HTML element to set the target path, this option lets you change the name of the HTML element itself. -use_referer -........... +``use_referer`` +............... **type**: ``boolean`` **default**: ``false`` @@ -496,8 +496,8 @@ redirected to the ``default_target_path`` to avoid a redirection loop. **Options Related to Logout Configuration** -invalidate_session -~~~~~~~~~~~~~~~~~~ +``invalidate_session`` +~~~~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` @@ -509,8 +509,8 @@ The ``invalidate_session`` option allows to redefine this behavior. Set this option to ``false`` in every firewall and the user will only be logged out from the current firewall and not the other ones. -logout_on_user_change -~~~~~~~~~~~~~~~~~~~~~ +``logout_on_user_change`` +~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -528,8 +528,8 @@ The user is considered to have changed when the user class implements required by the :class:`Symfony\\Component\\Security\\Core\\User\\UserInterface` (like the username, password or salt) changes. -success_handler -~~~~~~~~~~~~~~~ +``success_handler`` +~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``'security.logout.success_handler'`` @@ -557,15 +557,15 @@ You can authenticate to an LDAP server using the LDAP variants of the Both authentication providers have the same arguments as their normal counterparts, with the addition of two configuration keys: -service -....... +``service`` +........... **type**: ``string`` **default**: ``ldap`` This is the name of your configured LDAP client. -dn_string -......... +``dn_string`` +............. **type**: ``string`` **default**: ``{username}`` @@ -574,8 +574,8 @@ placeholder will be replaced with the user-provided value (their login). Depending on your LDAP server's configuration, you may need to override this value. -query_string -............ +``query_string`` +................ **type**: ``string`` **default**: ``null`` @@ -748,8 +748,8 @@ a ``user_checker`` option to define the service used to perform those checks. Learn more about user checkers in :doc:`/security/user_checkers`. -providers ---------- +``providers`` +------------- This options defines how the application users are loaded (from a database, an LDAP server, a configuration file, etc.) Read the following articles to learn @@ -760,8 +760,8 @@ more about each of those providers: * :ref:`Load users from a configuration file ` * :doc:`Create your own user provider ` -role_hierarchy --------------- +``role_hierarchy`` +------------------ Instead of associating many roles to users, this option allows you to define role inheritance rules by creating a role hierarchy, as explained in diff --git a/reference/configuration/swiftmailer.rst b/reference/configuration/swiftmailer.rst index 6af38c14f99..dd6033438f2 100644 --- a/reference/configuration/swiftmailer.rst +++ b/reference/configuration/swiftmailer.rst @@ -4,7 +4,7 @@ Mailer Configuration Reference (SwiftmailerBundle) ================================================== -The SwiftmailerBundle integrates the Swiftmailer library in Symfony applications +The SwiftmailerBundle integrates the Swift Mailer library in Symfony applications to :doc:`send emails `. All these options are configured under the ``swiftmailer`` key in your application configuration. @@ -55,112 +55,112 @@ Configuration * `url`_ * `username`_ -url -~~~ +``url`` +~~~~~~~ **type**: ``string`` -The entire SwiftMailer configuration using a DSN-like URL format. +The entire Swift Mailer configuration using a DSN-like URL format. Example: ``smtp://user:pass@host:port/?timeout=60&encryption=ssl&auth_mode=login&...`` -transport -~~~~~~~~~ +``transport`` +~~~~~~~~~~~~~ **type**: ``string`` **default**: ``smtp`` The exact transport method to use to deliver emails. Valid values are: -* smtp -* gmail (see :doc:`/email/gmail`) -* mail (deprecated in SwiftMailer since version 5.4.5) -* sendmail -* null (same as setting `disable_delivery`_ to ``true``) +* ``smtp`` +* ``gmail`` (see :doc:`/email/gmail`) +* ``mail`` (deprecated in Swift Mailer since version 5.4.5) +* ``sendmail`` +* ``null`` (same as setting `disable_delivery`_ to ``true``) -username -~~~~~~~~ +``username`` +~~~~~~~~~~~~ **type**: ``string`` The username when using ``smtp`` as the transport. -password -~~~~~~~~ +``password`` +~~~~~~~~~~~~ **type**: ``string`` The password when using ``smtp`` as the transport. -command -~~~~~~~~ +``command`` +~~~~~~~~~~~~ **type**: ``string`` **default**: ``/usr/sbin/sendmail -bs`` Command to be executed by ``sendmail`` transport. -host -~~~~ +``host`` +~~~~~~~~ **type**: ``string`` **default**: ``localhost`` The host to connect to when using ``smtp`` as the transport. -port -~~~~ +``port`` +~~~~~~~~ **type**: ``string`` **default**: 25 or 465 (depending on `encryption`_) The port when using ``smtp`` as the transport. This defaults to 465 if encryption is ``ssl`` and 25 otherwise. -timeout -~~~~~~~ +``timeout`` +~~~~~~~~~~~ **type**: ``integer`` The timeout in seconds when using ``smtp`` as the transport. -source_ip -~~~~~~~~~ +``source_ip`` +~~~~~~~~~~~~~ **type**: ``string`` The source IP address when using ``smtp`` as the transport. -local_domain -~~~~~~~~~~~~ - -**type**: ``string`` +``local_domain`` +~~~~~~~~~~~~~~~~ .. versionadded:: 2.4.0 The ``local_domain`` option was introduced in SwiftMailerBundle 2.4.0. +**type**: ``string`` + The domain name to use in ``HELO`` command. -encryption -~~~~~~~~~~ +``encryption`` +~~~~~~~~~~~~~~ **type**: ``string`` The encryption mode to use when using ``smtp`` as the transport. Valid values are ``tls``, ``ssl``, or ``null`` (indicating no encryption). -auth_mode -~~~~~~~~~ +``auth_mode`` +~~~~~~~~~~~~~ **type**: ``string`` The authentication mode to use when using ``smtp`` as the transport. Valid values are ``plain``, ``login``, ``cram-md5``, or ``null``. -spool -~~~~~ +``spool`` +~~~~~~~~~ For details on email spooling, see :doc:`/email/spool`. -type -.... +``type`` +........ **type**: ``string`` **default**: ``file`` @@ -168,16 +168,16 @@ The method used to store spooled messages. Valid values are ``memory`` and ``file``. A custom spool should be possible by creating a service called ``swiftmailer.spool.myspool`` and setting this value to ``myspool``. -path -.... +``path`` +........ **type**: ``string`` **default**: ``%kernel.cache_dir%/swiftmailer/spool`` When using the ``file`` spool, this is the path where the spooled messages will be stored. -sender_address -~~~~~~~~~~~~~~ +``sender_address`` +~~~~~~~~~~~~~~~~~~ **type**: ``string`` @@ -185,19 +185,19 @@ If set, all messages will be delivered with this address as the "return path" address, which is where bounced messages should go. This is handled internally by Swift Mailer's ``Swift_Plugins_ImpersonatePlugin`` class. -antiflood -~~~~~~~~~ +``antiflood`` +~~~~~~~~~~~~~ -threshold -......... +``threshold`` +............. **type**: ``integer`` **default**: ``99`` Used with ``Swift_Plugins_AntiFloodPlugin``. This is the number of emails to send before restarting the transport. -sleep -..... +``sleep`` +......... **type**: ``integer`` **default**: ``0`` @@ -206,8 +206,8 @@ to sleep for during a transport restart. .. _delivery-address: -delivery_addresses -~~~~~~~~~~~~~~~~~~ +``delivery_addresses`` +~~~~~~~~~~~~~~~~~~~~~~ **type**: ``array`` @@ -223,8 +223,8 @@ that all emails sent during development go to one or more some specific accounts This uses ``Swift_Plugins_RedirectingPlugin``. Original recipients are available on the ``X-Swift-To``, ``X-Swift-Cc`` and ``X-Swift-Bcc`` headers. -delivery_whitelist -~~~~~~~~~~~~~~~~~~ +``delivery_whitelist`` +~~~~~~~~~~~~~~~~~~~~~~ **type**: ``array`` @@ -234,16 +234,16 @@ of these patterns will be delivered like normal, as well as being sent to :ref:`How to Work with Emails during Development ` article. -disable_delivery -~~~~~~~~~~~~~~~~ +``disable_delivery`` +~~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` If true, the ``transport`` will automatically be set to ``null`` and no emails will actually be delivered. -logging -~~~~~~~ +``logging`` +~~~~~~~~~~~ **type**: ``boolean`` **default**: ``%kernel.debug%`` diff --git a/reference/configuration/twig.rst b/reference/configuration/twig.rst index c992686fcf6..5c18bef30c4 100644 --- a/reference/configuration/twig.rst +++ b/reference/configuration/twig.rst @@ -52,8 +52,8 @@ Configuration * `paths`_ * `strict_variables`_ -auto_reload -~~~~~~~~~~~ +``auto_reload`` +~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``%kernel.debug%`` @@ -61,8 +61,8 @@ If ``true``, whenever a template is rendered, Symfony checks first if its source code has changed since it was compiled. If it has changed, the template is compiled again automatically. -autoescape -~~~~~~~~~~ +``autoescape`` +~~~~~~~~~~~~~~ **type**: ``boolean`` or ``string`` **default**: ``'name'`` @@ -87,8 +87,8 @@ templates and ``js`` for ``*.js.html`` templates). See `autoescape_service`_ and `autoescape_service_method`_ to define your own escaping strategy. -autoescape_service -~~~~~~~~~~~~~~~~~~ +``autoescape_service`` +~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``null`` @@ -100,16 +100,16 @@ for HTML and the contents of ``*.js.twig`` are escaped for JavaScript. This option allows to define the Symfony service which will be used to determine the default escaping applied to the template. -autoescape_service_method -~~~~~~~~~~~~~~~~~~~~~~~~~ +``autoescape_service_method`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``null`` If ``autoescape_service`` option is defined, then this option defines the method called to determine the default escaping applied to the template. -base_template_class -~~~~~~~~~~~~~~~~~~~ +``base_template_class`` +~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``'Twig\Template'`` @@ -118,8 +118,8 @@ contents. This option defines the base class from which all the template classes extend. Using a custom base template is discouraged because it will make your application harder to maintain. -cache -~~~~~ +``cache`` +~~~~~~~~~ **type**: ``string`` | ``false`` **default**: ``'%kernel.cache_dir%/twig'`` @@ -132,47 +132,47 @@ is not recommended; not even in the ``dev`` environment, because the ``auto_reload`` option ensures that cached templates which have changed get compiled again. -charset -~~~~~~~ +``charset`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``'%kernel.charset%'`` The charset used by the template files. In the Symfony Standard edition this defaults to the ``UTF-8`` charset. -date -~~~~ +``date`` +~~~~~~~~ These options define the default values used by the ``date`` filter to format date and time values. They are useful to avoid passing the same arguments on every ``date`` filter call. -format -...... +``format`` +.......... **type**: ``string`` **default**: ``F j, Y H:i`` The format used by the ``date`` filter to display values when no specific format is passed as argument. -interval_format -............... +``interval_format`` +................... **type**: ``string`` **default**: ``%d days`` The format used by the ``date`` filter to display ``DateInterval`` instances when no specific format is passed as argument. -timezone -........ +``timezone`` +............ **type**: ``string`` **default**: (the value returned by ``date_default_timezone_get()``) The timezone used when formatting date values with the ``date`` filter and no specific timezone is passed as argument. -debug -~~~~~ +``debug`` +~~~~~~~~~ **type**: ``boolean`` **default**: ``%kernel.debug%`` @@ -181,8 +181,8 @@ be used to display their nodes. .. _config-twig-exception-controller: -exception_controller -~~~~~~~~~~~~~~~~~~~~ +``exception_controller`` +~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``twig.controller.exception:showAction`` @@ -195,23 +195,23 @@ option is advanced. If you need to customize an error page you should use the previous link. If you need to perform some behavior on an exception, you should add a listener to the ``kernel.exception`` event (see :ref:`dic-tags-kernel-event-listener`). -number_format -~~~~~~~~~~~~~ +``number_format`` +~~~~~~~~~~~~~~~~~ These options define the default values used by the ``number_format`` filter to format numeric values. They are useful to avoid passing the same arguments on every ``number_format`` filter call. -decimals -........ +``decimals`` +............ **type**: ``integer`` **default**: ``0`` The number of decimals used to format numeric values when no specific number is passed as argument to the ``number_format`` filter. -decimal_point -............. +``decimal_point`` +................. **type**: ``string`` **default**: ``.`` @@ -219,16 +219,16 @@ The character used to separate the decimals from the integer part of numeric values when no specific character is passed as argument to the ``number_format`` filter. -thousands_separator -................... +``thousands_separator`` +....................... **type**: ``string`` **default**: ``,`` The character used to separate every group of thousands in numeric values when no specific character is passed as argument to the ``number_format`` filter. -optimizations -~~~~~~~~~~~~~ +``optimizations`` +~~~~~~~~~~~~~~~~~ **type**: ``int`` **default**: ``-1`` @@ -243,8 +243,8 @@ on. Set it to ``0`` to disable all the optimizations. You can even enable or disable these optimizations selectively, as explained in the Twig documentation about `the optimizer extension`_. -default_path -~~~~~~~~~~~~ +``default_path`` +~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``'%kernel.project_dir%/templates'`` @@ -256,8 +256,8 @@ The default directory where Symfony will look for Twig templates. .. _config-twig-paths: -paths -~~~~~ +``paths`` +~~~~~~~~~ **type**: ``array`` **default**: ``null`` @@ -360,8 +360,8 @@ by Symfony. Besides, it simplifies how you refer to those templates: @foo_bar/template_name.html.twig -strict_variables -~~~~~~~~~~~~~~~~ +``strict_variables`` +~~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/configuration/web_profiler.rst b/reference/configuration/web_profiler.rst index f8c8cc951d5..8772bb225bf 100644 --- a/reference/configuration/web_profiler.rst +++ b/reference/configuration/web_profiler.rst @@ -38,8 +38,8 @@ Configuration * `toolbar`_ * `verbose`_ -toolbar -~~~~~~~ +``toolbar`` +~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -47,8 +47,8 @@ It enables and disables the toolbar entirely. Usually you set this to ``true`` in the ``dev`` and ``test`` environments and to ``false`` in the ``prod`` environment. -position -~~~~~~~~ +``position`` +~~~~~~~~~~~~ .. deprecated:: 3.4 @@ -60,8 +60,8 @@ position It defines the location of the browser window where the toolbar is displayed. the only allowed values are ``bottom`` and ``top``. -intercept_redirects -~~~~~~~~~~~~~~~~~~~ +``intercept_redirects`` +~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -74,8 +74,8 @@ redirection and shows you the URL which is going to redirect to, its toolbar, and its profiler. Once you've inspected the toolbar/profiler data, you can click on the given link to perform the redirect. -excluded_ajax_paths -~~~~~~~~~~~~~~~~~~~ +``excluded_ajax_paths`` +~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``'^/(app(_[\\w]+)?\\.php/)?_wdt'`` @@ -84,8 +84,8 @@ expression. If the URL matches, the request is not displayed in the toolbar. Thi is useful when the application makes lots of AJAX requests, or if they are heavy and you want to exclude some of them. -verbose -~~~~~~~ +``verbose`` +~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` diff --git a/reference/constraints/All.rst b/reference/constraints/All.rst index bdbb58add3e..418762b214c 100644 --- a/reference/constraints/All.rst +++ b/reference/constraints/All.rst @@ -102,8 +102,8 @@ be blank and to be at least 5 characters long. Options ------- -constraints -~~~~~~~~~~~ +``constraints`` +~~~~~~~~~~~~~~~ **type**: ``array`` [:ref:`default option `] diff --git a/reference/constraints/Bic.rst b/reference/constraints/Bic.rst index efc56dd965c..713d33fbb15 100644 --- a/reference/constraints/Bic.rst +++ b/reference/constraints/Bic.rst @@ -81,13 +81,13 @@ will contain a Business Identifier Code (BIC). .. include:: /reference/constraints/_empty-values-are-valid.rst.inc -Available Options ------------------ +Options +------- .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This is not a valid Business Identifier Code (BIC).`` diff --git a/reference/constraints/Blank.rst b/reference/constraints/Blank.rst index 20dedfe5444..cedbf071534 100644 --- a/reference/constraints/Blank.rst +++ b/reference/constraints/Blank.rst @@ -92,8 +92,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value should be blank.`` diff --git a/reference/constraints/Callback.rst b/reference/constraints/Callback.rst index 1331631cb26..08453614edb 100644 --- a/reference/constraints/Callback.rst +++ b/reference/constraints/Callback.rst @@ -259,8 +259,8 @@ Options .. _callback-option: -callback -~~~~~~~~ +``callback`` +~~~~~~~~~~~~ **type**: ``string``, ``array`` or ``Closure`` [:ref:`default option `] diff --git a/reference/constraints/CardScheme.rst b/reference/constraints/CardScheme.rst index b186d9245fe..dcf44a844c2 100644 --- a/reference/constraints/CardScheme.rst +++ b/reference/constraints/CardScheme.rst @@ -102,8 +102,8 @@ Available Options .. include:: /reference/constraints/_groups-option.rst.inc -schemes -~~~~~~~ +``schemes`` +~~~~~~~~~~~ **type**: ``mixed`` [:ref:`default option `] @@ -125,8 +125,8 @@ Valid values are: For more information about the used schemes, see `Wikipedia: Issuer identification number (IIN)`_. -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``Unsupported card type or invalid card number.`` diff --git a/reference/constraints/Choice.rst b/reference/constraints/Choice.rst index 65378aec8c3..acb88f36eaa 100644 --- a/reference/constraints/Choice.rst +++ b/reference/constraints/Choice.rst @@ -285,8 +285,8 @@ you can pass the class name and the method as an array. Available Options ----------------- -choices -~~~~~~~ +``choices`` +~~~~~~~~~~~ **type**: ``array`` [:ref:`default option `] @@ -294,8 +294,8 @@ A required option (unless `callback`_ is specified) - this is the array of options that should be considered in the valid set. The input value will be matched against this array. -callback -~~~~~~~~ +``callback`` +~~~~~~~~~~~~ **type**: ``string|array|Closure`` @@ -305,8 +305,8 @@ to return the choices array. See .. include:: /reference/constraints/_groups-option.rst.inc -multiple -~~~~~~~~ +``multiple`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -315,8 +315,8 @@ of a single, scalar value. The constraint will check that each value of the input array can be found in the array of valid choices. If even one of the input values cannot be found, the validation will fail. -min -~~~ +``min`` +~~~~~~~ **type**: ``integer`` @@ -325,8 +325,8 @@ to force at least XX number of values to be selected. For example, if ``min`` is 3, but the input array only contains 2 valid items, the validation will fail. -max -~~~ +``max`` +~~~~~~~ **type**: ``integer`` @@ -335,8 +335,8 @@ to force no more than XX number of values to be selected. For example, if ``max`` is 3, but the input array contains 4 valid items, the validation will fail. -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``The value you selected is not a valid choice.`` @@ -352,8 +352,8 @@ You can use the following parameters in this message: | ``{{ value }}`` | The current (invalid) value | +------------------+------------------------------------------------+ -multipleMessage -~~~~~~~~~~~~~~~ +``multipleMessage`` +~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``One or more of the given values is invalid.`` @@ -369,8 +369,8 @@ You can use the following parameters in this message: | ``{{ value }}`` | The current (invalid) value | +------------------+------------------------------------------------+ -minMessage -~~~~~~~~~~ +``minMessage`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``You must select at least {{ limit }} choices.`` @@ -385,8 +385,8 @@ You can use the following parameters in this message: | ``{{ limit }}`` | The lower limit of choices | +------------------+------------------------------------------------+ -maxMessage -~~~~~~~~~~ +``maxMessage`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``You must select at most {{ limit }} choices.`` @@ -401,8 +401,8 @@ You can use the following parameters in this message: | ``{{ limit }}`` | The upper limit of choices | +------------------+------------------------------------------------+ -strict -~~~~~~ +``strict`` +~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/constraints/Collection.rst b/reference/constraints/Collection.rst index 9984e3885e0..a296f68dc3e 100644 --- a/reference/constraints/Collection.rst +++ b/reference/constraints/Collection.rst @@ -290,27 +290,27 @@ the ``NotBlank`` constraint will still be applied (since it is wrapped in Options ------- -allowExtraFields -~~~~~~~~~~~~~~~~ +``allowExtraFields`` +~~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: false If this option is set to ``false`` and the underlying collection contains one or more elements that are not included in the `fields`_ option, a validation -error will be returned. If set to ``true``, extra fields are ok. +error will be returned. If set to ``true``, extra fields are OK. -allowMissingFields -~~~~~~~~~~~~~~~~~~ +``allowMissingFields`` +~~~~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: false If this option is set to ``false`` and one or more fields from the `fields`_ option are not present in the underlying collection, a validation error -will be returned. If set to ``true``, it's ok if some fields in the `fields`_ +will be returned. If set to ``true``, it's OK if some fields in the `fields`_ option are not present in the underlying collection. -extraFieldsMessage -~~~~~~~~~~~~~~~~~~ +``extraFieldsMessage`` +~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``This field was not expected.`` @@ -325,8 +325,8 @@ You can use the following parameters in this message: | ``{{ field }}`` | The key of the extra field detected | +------------------+------------------------------------------------+ -fields -~~~~~~ +``fields`` +~~~~~~~~~~ **type**: ``array`` [:ref:`default option `] @@ -336,8 +336,8 @@ be executed against that element of the collection. .. include:: /reference/constraints/_groups-option.rst.inc -missingFieldsMessage -~~~~~~~~~~~~~~~~~~~~ +``missingFieldsMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``This field is missing.`` diff --git a/reference/constraints/Count.rst b/reference/constraints/Count.rst index 3371d8cf278..cb1dc2c158c 100644 --- a/reference/constraints/Count.rst +++ b/reference/constraints/Count.rst @@ -106,8 +106,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -min -~~~ +``min`` +~~~~~~~ **type**: ``integer`` @@ -116,8 +116,8 @@ collection elements count is **less** than this min value. This option is required when the ``max`` option is not defined. -max -~~~ +``max`` +~~~~~~~ **type**: ``integer`` @@ -126,8 +126,8 @@ collection elements count is **greater** than this max value. This option is required when the ``min`` option is not defined. -minMessage -~~~~~~~~~~ +``minMessage`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``This collection should contain {{ limit }} elements or more.`` @@ -144,8 +144,8 @@ You can use the following parameters in this message: | ``{{ limit }}`` | The lower limit | +------------------+------------------------------------------------+ -maxMessage -~~~~~~~~~~ +``maxMessage`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``This collection should contain {{ limit }} elements or less.`` @@ -162,8 +162,8 @@ You can use the following parameters in this message: | ``{{ limit }}`` | The upper limit | +------------------+------------------------------------------------+ -exactMessage -~~~~~~~~~~~~ +``exactMessage`` +~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``This collection should contain exactly {{ limit }} elements.`` diff --git a/reference/constraints/Country.rst b/reference/constraints/Country.rst index 5f33ced3ce4..7f87aa54089 100644 --- a/reference/constraints/Country.rst +++ b/reference/constraints/Country.rst @@ -81,8 +81,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is not a valid country.`` diff --git a/reference/constraints/Currency.rst b/reference/constraints/Currency.rst index 33b635a85c9..397f8d76e54 100644 --- a/reference/constraints/Currency.rst +++ b/reference/constraints/Currency.rst @@ -84,8 +84,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is not a valid currency.`` diff --git a/reference/constraints/Date.rst b/reference/constraints/Date.rst index 3fb06f7944b..51744cbbc60 100644 --- a/reference/constraints/Date.rst +++ b/reference/constraints/Date.rst @@ -83,8 +83,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is not a valid date.`` diff --git a/reference/constraints/DateTime.rst b/reference/constraints/DateTime.rst index 777b7e083bb..18a0621b335 100644 --- a/reference/constraints/DateTime.rst +++ b/reference/constraints/DateTime.rst @@ -92,8 +92,8 @@ This option allows to validate a custom date format. See .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is not a valid datetime.`` diff --git a/reference/constraints/Email.rst b/reference/constraints/Email.rst index 9158966f16e..b6b6fb453ef 100644 --- a/reference/constraints/Email.rst +++ b/reference/constraints/Email.rst @@ -96,8 +96,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -strict -~~~~~~ +``strict`` +~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -105,8 +105,8 @@ When false, the email will be validated against a simple regular expression. If true, then the `egulias/email-validator`_ library is required to perform an RFC compliant validation. -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is not a valid email address.`` @@ -120,8 +120,8 @@ You can use the following parameters in this message: | ``{{ value }}`` | The current (invalid) value | +------------------+------------------------------------------------+ -checkMX -~~~~~~~ +``checkMX`` +~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -133,8 +133,8 @@ check the validity of the MX record of the host of the given email. This option is not reliable because it depends on the network conditions and some valid servers refuse to respond to those requests. -checkHost -~~~~~~~~~ +``checkHost`` +~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/constraints/EqualTo.rst b/reference/constraints/EqualTo.rst index fc076f7a0cf..d68e074647b 100644 --- a/reference/constraints/EqualTo.rst +++ b/reference/constraints/EqualTo.rst @@ -114,8 +114,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value should be equal to {{ compared_value }}.`` diff --git a/reference/constraints/Expression.rst b/reference/constraints/Expression.rst index a02dc3f4926..b4d0b865d60 100644 --- a/reference/constraints/Expression.rst +++ b/reference/constraints/Expression.rst @@ -221,13 +221,13 @@ For more information about the expression and what variables are available to you, see the :ref:`expression ` option details below. -Available Options ------------------ +Options +------- .. _reference-constraint-expression-option: -expression -~~~~~~~~~~ +``expression`` +~~~~~~~~~~~~~~ **type**: ``string`` [:ref:`default option `] @@ -248,8 +248,8 @@ in your expression: .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is not valid.`` diff --git a/reference/constraints/File.rst b/reference/constraints/File.rst index 4ee5015e7e2..87de26e80e0 100644 --- a/reference/constraints/File.rst +++ b/reference/constraints/File.rst @@ -161,8 +161,8 @@ have been specified. Options ------- -maxSize -~~~~~~~ +``maxSize`` +~~~~~~~~~~~ **type**: ``mixed`` @@ -170,38 +170,38 @@ If set, the size of the underlying file must be below this file size in order to be valid. The size of the file can be given in one of the following formats: -+--------+-----------+-----------------+------+ -| Suffix | Unit Name | value | e.g. | -+========+===========+=================+======+ -| | byte | 1 byte | 4096 | -+--------+-----------+-----------------+------+ -| k | kilobyte | 1,000 bytes | 200k | -+--------+-----------+-----------------+------+ -| M | megabyte | 1,000,000 bytes | 2M | -+--------+-----------+-----------------+------+ -| Ki | kibibyte | 1,024 bytes | 32Ki | -+--------+-----------+-----------------+------+ -| Mi | mebibyte | 1,048,576 bytes | 8Mi | -+--------+-----------+-----------------+------+ ++--------+-----------+-----------------+----------+ +| Suffix | Unit Name | value | e.g. | ++========+===========+=================+==========+ +| | byte | 1 byte | ``4096`` | ++--------+-----------+-----------------+----------+ +| k | kilobyte | 1,000 bytes | ``200k`` | ++--------+-----------+-----------------+----------+ +| M | megabyte | 1,000,000 bytes | ``2M`` | ++--------+-----------+-----------------+----------+ +| Ki | kibibyte | 1,024 bytes | ``32Ki`` | ++--------+-----------+-----------------+----------+ +| Mi | mebibyte | 1,048,576 bytes | ``8Mi`` | ++--------+-----------+-----------------+----------+ For more information about the difference between binary and SI prefixes, see `Wikipedia: Binary prefix`_. -binaryFormat -~~~~~~~~~~~~ +``binaryFormat`` +~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``null`` When ``true``, the sizes will be displayed in messages with binary-prefixed units (KiB, MiB). When ``false``, the sizes will be displayed with SI-prefixed -units (kB, MB). When ``null``, then the binaryFormat will be guessed from +units (kB, MB). When ``null``, the ``binaryFormat`` will be guessed from the value defined in the ``maxSize`` option. For more information about the difference between binary and SI prefixes, see `Wikipedia: Binary prefix`_. -mimeTypes -~~~~~~~~~ +``mimeTypes`` +~~~~~~~~~~~~~ **type**: ``array`` or ``string`` @@ -211,8 +211,8 @@ of given mime types (if an array). You can find a list of existing mime types on the `IANA website`_. -maxSizeMessage -~~~~~~~~~~~~~~ +``maxSizeMessage`` +~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.`` @@ -232,8 +232,8 @@ You can use the following parameters in this message: | ``{{ file }}`` | Absolute file path | +------------------+------------------------------------------------+ -mimeTypesMessage -~~~~~~~~~~~~~~~~ +``mimeTypesMessage`` +~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.`` @@ -252,8 +252,8 @@ You can use the following parameters in this message: | ``{{ file }}`` | Absolute file path | +-----------------+----------------------------------------+ -disallowEmptyMessage -~~~~~~~~~~~~~~~~~~~~ +``disallowEmptyMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``An empty file is not allowed.`` @@ -268,8 +268,8 @@ You can use the following parameters in this message: | ``{{ file }}`` | Absolute file path | +----------------+--------------------+ -notFoundMessage -~~~~~~~~~~~~~~~ +``notFoundMessage`` +~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file could not be found.`` @@ -285,8 +285,8 @@ You can use the following parameters in this message: | ``{{ file }}`` | Absolute file path | +----------------+--------------------+ -notReadableMessage -~~~~~~~~~~~~~~~~~~ +``notReadableMessage`` +~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file is not readable.`` @@ -301,8 +301,8 @@ You can use the following parameters in this message: | ``{{ file }}`` | Absolute file path | +----------------+--------------------+ -uploadIniSizeErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadIniSizeErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.`` @@ -319,8 +319,8 @@ You can use the following parameters in this message: | ``{{ suffix }}`` | Suffix for the used file size unit (see above) | +------------------+------------------------------------------------+ -uploadFormSizeErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadFormSizeErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file is too large.`` @@ -329,8 +329,8 @@ by the HTML file input field. This message has no parameters. -uploadPartialErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadPartialErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file was only partially uploaded.`` @@ -338,8 +338,8 @@ The message that is displayed if the uploaded file is only partially uploaded. This message has no parameters. -uploadNoFileErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadNoFileErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``No file was uploaded.`` @@ -347,18 +347,18 @@ The message that is displayed if no file was uploaded. This message has no parameters. -uploadNoTmpDirErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadNoTmpDirErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``No temporary folder was configured in php.ini.`` -The message that is displayed if the php.ini setting ``upload_tmp_dir`` is +The message that is displayed if the ``php.ini`` setting ``upload_tmp_dir`` is missing. This message has no parameters. -uploadCantWriteErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadCantWriteErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``Cannot write temporary file to disk.`` @@ -367,8 +367,8 @@ temporary folder. This message has no parameters. -uploadExtensionErrorMessage -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``uploadExtensionErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``A PHP extension caused the upload to fail.`` @@ -377,8 +377,8 @@ fail. This message has no parameters. -uploadErrorMessage -~~~~~~~~~~~~~~~~~~ +``uploadErrorMessage`` +~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The file could not be uploaded.`` diff --git a/reference/constraints/GreaterThan.rst b/reference/constraints/GreaterThan.rst index 478c06fb1b4..faee4be69d5 100644 --- a/reference/constraints/GreaterThan.rst +++ b/reference/constraints/GreaterThan.rst @@ -294,8 +294,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value should be greater than {{ compared_value }}.`` diff --git a/reference/constraints/GreaterThanOrEqual.rst b/reference/constraints/GreaterThanOrEqual.rst index f23567771b3..2b595c40089 100644 --- a/reference/constraints/GreaterThanOrEqual.rst +++ b/reference/constraints/GreaterThanOrEqual.rst @@ -293,8 +293,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value should be greater than or equal to {{ compared_value }}.`` diff --git a/reference/constraints/Iban.rst b/reference/constraints/Iban.rst index cc074fb327d..d7df4d9ea9a 100644 --- a/reference/constraints/Iban.rst +++ b/reference/constraints/Iban.rst @@ -1,4 +1,4 @@ -Iban +IBAN ==== This constraint is used to ensure that a bank account number has the proper @@ -21,7 +21,7 @@ borders with a reduced risk of propagating transcription errors. Basic Usage ----------- -To use the Iban validator, apply it to a property on an object that +To use the IBAN validator, apply it to a property on an object that will contain an International Bank Account Number. .. configuration-block:: @@ -93,17 +93,17 @@ will contain an International Bank Account Number. .. include:: /reference/constraints/_empty-values-are-valid.rst.inc -Available Options ------------------ +Options +------- .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This is not a valid International Bank Account Number (IBAN).`` -The default message supplied when the value does not pass the Iban check. +The default message supplied when the value does not pass the IBAN check. You can use the following parameters in this message: diff --git a/reference/constraints/IdenticalTo.rst b/reference/constraints/IdenticalTo.rst index dd1e6bb96f7..200b4cb0632 100644 --- a/reference/constraints/IdenticalTo.rst +++ b/reference/constraints/IdenticalTo.rst @@ -117,8 +117,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value should be identical to {{ compared_value_type }} {{ compared_value }}.`` diff --git a/reference/constraints/Image.rst b/reference/constraints/Image.rst index d3f2f434a0f..75df3f83566 100644 --- a/reference/constraints/Image.rst +++ b/reference/constraints/Image.rst @@ -229,52 +229,52 @@ This constraint shares all of its options with the :doc:`File `] @@ -180,8 +180,8 @@ fail if the input string *does* match this pattern. .. include:: /reference/constraints/_groups-option.rst.inc -htmlPattern -~~~~~~~~~~~ +``htmlPattern`` +~~~~~~~~~~~~~~~ **type**: ``string|boolean`` **default**: null @@ -265,8 +265,8 @@ need to specify the HTML5 compatible pattern in the ``htmlPattern`` option: Setting ``htmlPattern`` to false will disable client side validation. -match -~~~~~ +``match`` +~~~~~~~~~ **type**: ``boolean`` default: ``true`` @@ -275,8 +275,8 @@ the given `pattern`_ regular expression. However, when this option is set to ``false``, the opposite will occur: validation will pass only if the given string does **not** match the `pattern`_ regular expression. -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is not valid.`` diff --git a/reference/constraints/Time.rst b/reference/constraints/Time.rst index d044527463b..764a29c65f5 100644 --- a/reference/constraints/Time.rst +++ b/reference/constraints/Time.rst @@ -86,8 +86,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is not a valid time.`` diff --git a/reference/constraints/Type.rst b/reference/constraints/Type.rst index 2e3bdb27611..fbc1e6fc6d4 100644 --- a/reference/constraints/Type.rst +++ b/reference/constraints/Type.rst @@ -127,8 +127,8 @@ Options .. _reference-constraint-type-type: -type -~~~~ +``type`` +~~~~~~~~ **type**: ``string`` [:ref:`default option `] @@ -172,8 +172,8 @@ using one of these. .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value should be of type {{ type }}.`` diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index 37a7f675047..e229fb6447d 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -123,8 +123,8 @@ that the ``email`` field remains unique between all of the rows in your user tab Options ------- -fields -~~~~~~ +``fields`` +~~~~~~~~~~ **type**: ``array`` | ``string`` [:ref:`default option `] @@ -140,8 +140,8 @@ each with a single field. .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is already used.`` @@ -162,8 +162,8 @@ You can use the following parameters in this message: | ``{{ value }}`` | The current (invalid) value | +-----------------+-----------------------------+ -em -~~ +``em`` +~~~~~~ **type**: ``string`` @@ -172,8 +172,8 @@ the uniqueness. If it's left blank, the correct entity manager will be determined for this class. For that reason, this option should probably not need to be used. -repositoryMethod -~~~~~~~~~~~~~~~~ +``repositoryMethod`` +~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``findBy`` @@ -183,8 +183,8 @@ blank, ``findBy()`` will be used. The method receives as its argument a fields configured in the ``fields`` option). The method should return a `countable PHP variable`_. -entityClass -~~~~~~~~~~~ +``entityClass`` +~~~~~~~~~~~~~~~ .. versionadded:: 3.2 @@ -198,8 +198,8 @@ inheritance mapping, you need to execute the query in a different repository. Use this option to define the fully-qualified class name (FQCN) of the Doctrine entity associated with the repository you want to use. -errorPath -~~~~~~~~~ +``errorPath`` +~~~~~~~~~~~~~ **type**: ``string`` **default**: The name of the first field in `fields`_ @@ -296,8 +296,8 @@ Consider this example: Now, the message would be bound to the ``port`` field with this configuration. -ignoreNull -~~~~~~~~~~ +``ignoreNull`` +~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` diff --git a/reference/constraints/Url.rst b/reference/constraints/Url.rst index 7992ba93a4d..0dfaa782a7a 100644 --- a/reference/constraints/Url.rst +++ b/reference/constraints/Url.rst @@ -1,4 +1,4 @@ -Url +URL === Validates that a value is a valid URL string. @@ -84,8 +84,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is not a valid URL.`` @@ -162,8 +162,8 @@ You can use the following parameters in this message: } } -protocols -~~~~~~~~~ +``protocols`` +~~~~~~~~~~~~~ **type**: ``array`` **default**: ``['http', 'https']`` @@ -239,8 +239,8 @@ the ``ftp://`` type URLs to be valid, redefine the ``protocols`` array, listing .. include:: /reference/constraints/_payload-option.rst.inc -checkDNS -~~~~~~~~ +``checkDNS`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -314,8 +314,8 @@ option to the value of any of the ``CHECK_DNS_TYPE_*`` constants in the This option uses the :phpfunction:`checkdnsrr` PHP function to check the validity of the DNS record corresponding to the host associated with the given URL. -dnsMessage -~~~~~~~~~~ +``dnsMessage`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The host could not be resolved.`` diff --git a/reference/constraints/UserPassword.rst b/reference/constraints/UserPassword.rst index 7ebdda483f3..310e46d5192 100644 --- a/reference/constraints/UserPassword.rst +++ b/reference/constraints/UserPassword.rst @@ -103,8 +103,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``message`` **default**: ``This value should be the user current password.`` diff --git a/reference/constraints/Uuid.rst b/reference/constraints/Uuid.rst index f961beb9ac8..a1796a33373 100644 --- a/reference/constraints/Uuid.rst +++ b/reference/constraints/Uuid.rst @@ -1,4 +1,4 @@ -Uuid +UUID ==== Validates that a value is a valid `Universally unique identifier (UUID)`_ per `RFC 4122`_. @@ -86,8 +86,8 @@ Options .. include:: /reference/constraints/_groups-option.rst.inc -message -~~~~~~~ +``message`` +~~~~~~~~~~~ **type**: ``string`` **default**: ``This is not a valid UUID.`` @@ -101,8 +101,8 @@ You can use the following parameters in this message: | ``{{ value }}`` | The current (invalid) value | +-----------------+-----------------------------+ -strict -~~~~~~ +``strict`` +~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` @@ -114,8 +114,8 @@ will allow alternate input formats like: * ``{216fff40-98d9-11e3-a5e2-0800200c9a66}`` * ``216fff4098d911e3a5e20800200c9a66`` -versions -~~~~~~~~ +``versions`` +~~~~~~~~~~~~ **type**: ``int[]`` **default**: ``[1,2,3,4,5]`` diff --git a/reference/constraints/Valid.rst b/reference/constraints/Valid.rst index 5ccc42bdb29..87c87faf51c 100644 --- a/reference/constraints/Valid.rst +++ b/reference/constraints/Valid.rst @@ -248,8 +248,8 @@ the validation of the ``Address`` fields failed. Options ------- -traverse -~~~~~~~~ +``traverse`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` diff --git a/reference/constraints/_comparison-propertypath-option.rst.inc b/reference/constraints/_comparison-propertypath-option.rst.inc index a2acc52ef5c..f1dac752528 100644 --- a/reference/constraints/_comparison-propertypath-option.rst.inc +++ b/reference/constraints/_comparison-propertypath-option.rst.inc @@ -1,5 +1,5 @@ -propertyPath -~~~~~~~~~~~~ +``propertyPath`` +~~~~~~~~~~~~~~~~ **type**: ``string`` diff --git a/reference/constraints/_comparison-value-option.rst.inc b/reference/constraints/_comparison-value-option.rst.inc index cb7e07045a5..b587e46ffef 100644 --- a/reference/constraints/_comparison-value-option.rst.inc +++ b/reference/constraints/_comparison-value-option.rst.inc @@ -1,5 +1,5 @@ -value -~~~~~ +``value`` +~~~~~~~~~ **type**: ``mixed`` [:ref:`default option `] diff --git a/reference/constraints/_groups-option.rst.inc b/reference/constraints/_groups-option.rst.inc index f385b060477..0de5e2046b5 100644 --- a/reference/constraints/_groups-option.rst.inc +++ b/reference/constraints/_groups-option.rst.inc @@ -1,5 +1,5 @@ -groups -~~~~~~ +``groups`` +~~~~~~~~~~ **type**: ``array`` | ``string`` diff --git a/reference/constraints/_payload-option.rst.inc b/reference/constraints/_payload-option.rst.inc index 433fa39eae7..5121ba1ae51 100644 --- a/reference/constraints/_payload-option.rst.inc +++ b/reference/constraints/_payload-option.rst.inc @@ -1,5 +1,5 @@ -payload -~~~~~~~ +``payload`` +~~~~~~~~~~~ **type**: ``mixed`` **default**: ``null`` diff --git a/reference/dic_tags.rst b/reference/dic_tags.rst index 35a44883808..ab05b98a7be 100644 --- a/reference/dic_tags.rst +++ b/reference/dic_tags.rst @@ -54,13 +54,13 @@ Tag Name Usage `validator.initializer`_ Register a service that initializes objects before validation ======================================== ======================================================================== -assetic.asset -------------- +``assetic.asset`` +----------------- **Purpose**: Register an asset with the current asset manager -assetic.factory_worker ----------------------- +``assetic.factory_worker`` +-------------------------- **Purpose**: Add a factory worker @@ -116,8 +116,8 @@ And then register it as a tagged service: ->addTag('assetic.factory_worker') ; -assetic.filter --------------- +``assetic.filter`` +------------------ **Purpose**: Register a filter @@ -194,8 +194,8 @@ In order to do that, you must define your filter service in a separate xml config file and point to this file's path via the ``assetic.filters.my_filter.resource`` configuration key. -assetic.formula_loader ----------------------- +``assetic.formula_loader`` +-------------------------- **Purpose**: Add a formula loader to the current asset manager @@ -206,32 +206,32 @@ instance, twig template). Assetic ships loaders for PHP and Twig templates. An ``alias`` attribute defines the name of the loader. -assetic.formula_resource ------------------------- +``assetic.formula_resource`` +---------------------------- **Purpose**: Adds a resource to the current asset manager A resource is something formulae can be loaded from. For instance, Twig templates are resources. -assetic.templating.php ----------------------- +``assetic.templating.php`` +-------------------------- **Purpose**: Remove this service if PHP templating is disabled The tagged service will be removed from the container if the -``framework.templating.engines`` config section does not contain php. +``framework.templating.engines`` config section does not contain PHP. -assetic.templating.twig ------------------------ +``assetic.templating.twig`` +--------------------------- **Purpose**: Remove this service if Twig templating is disabled The tagged service will be removed from the container if ``framework.templating.engines`` config section does not contain ``twig``. -auto_alias ----------- +``auto_alias`` +-------------- **Purpose**: Define aliases based on the value of container parameters @@ -355,16 +355,16 @@ wrapping their names with ``%`` characters). You need to manually add the ``Symfony\Component\DependencyInjection\Compiler\AutoAliasServicePass`` compiler pass to the container for this feature to work. -console.command ---------------- +``console.command`` +------------------- **Purpose**: Add a command to the application For details on registering your own commands in the service container, read :doc:`/console/commands_as_services`. -container.hot_path ------------------- +``container.hot_path`` +---------------------- .. versionadded:: 3.4 @@ -384,8 +384,8 @@ for services and their class hierarchy. The result is as significant performance Use this tag with great caution, you have to be sure that the tagged service is always used. -controller.argument_value_resolver ----------------------------------- +``controller.argument_value_resolver`` +-------------------------------------- **Purpose**: Register a value resolver for controller arguments such as ``Request`` @@ -394,24 +394,24 @@ Value resolvers implement the and are used to resolve argument values for controllers as described here: :doc:`/controller/argument_value_resolver`. -data_collector --------------- +``data_collector`` +------------------ **Purpose**: Create a class that collects custom data for the profiler For details on creating your own custom data collection, read the :doc:`/profiler/data_collector` article. -doctrine.event_listener ------------------------ +``doctrine.event_listener`` +--------------------------- **Purpose**: Add a Doctrine event listener For details on creating Doctrine event listeners, read the :doc:`/doctrine/event_listeners_subscribers` article. -doctrine.event_subscriber -------------------------- +``doctrine.event_subscriber`` +----------------------------- **Purpose**: Add a Doctrine event subscriber @@ -420,16 +420,16 @@ For details on creating Doctrine event subscribers, read the .. _dic-tags-form-type: -form.type ---------- +``form.type`` +------------- **Purpose**: Create a custom form field type For details on creating your own custom form type, read the :doc:`/form/create_custom_field_type` article. -form.type_extension -------------------- +``form.type_extension`` +----------------------- **Purpose**: Create a custom "form extension" @@ -438,8 +438,8 @@ For details on creating Form type extensions, read the .. _reference-dic-type_guesser: -form.type_guesser ------------------ +``form.type_guesser`` +--------------------- **Purpose**: Add your own logic for "form type guessing" @@ -453,8 +453,8 @@ metadata and Doctrine metadata (if you're using Doctrine) or Propel metadata For information on how to create your own type guesser, see :doc:`/form/type_guesser`. -kernel.cache_clearer --------------------- +``kernel.cache_clearer`` +------------------------ **Purpose**: Register your service to be called during the cache clearing process @@ -515,8 +515,8 @@ can also register it manually: ->addTag('kernel.cache_clearer') ; -kernel.cache_warmer -------------------- +``kernel.cache_warmer`` +----------------------- **Purpose**: Register your service to be called during the cache warming process @@ -617,8 +617,8 @@ with the following command: .. _dic-tags-kernel-event-listener: -kernel.event_listener ---------------------- +``kernel.event_listener`` +------------------------- **Purpose**: To listen to different events/hooks in Symfony @@ -637,16 +637,16 @@ see the :doc:`Symfony Events Reference `. .. _dic-tags-kernel-event-subscriber: -kernel.event_subscriber ------------------------ +``kernel.event_subscriber`` +--------------------------- **Purpose**: To subscribe to a set of different events/hooks in Symfony This is an alternative way to create an event listener, and is the recommended way (instead of using ``kernel.event_listener``). See :ref:`events-subscriber`. -kernel.fragment_renderer ------------------------- +``kernel.fragment_renderer`` +---------------------------- **Purpose**: Add a new HTTP content rendering strategy @@ -655,8 +655,8 @@ To add a new rendering strategy - in addition to the core strategies like :class:`Symfony\\Component\\HttpKernel\\Fragment\\FragmentRendererInterface`, register it as a service, then tag it with ``kernel.fragment_renderer``. -kernel.reset ------------- +``kernel.reset`` +---------------- **Purpose**: Clean up services between requests @@ -672,8 +672,8 @@ of the profiler to delete all their information. .. _dic_tags-monolog: -monolog.logger --------------- +``monolog.logger`` +------------------ **Purpose**: To use a custom logging channel with Monolog @@ -724,8 +724,8 @@ channel when injecting the logger in a service. .. _dic_tags-monolog-processor: -monolog.processor ------------------ +``monolog.processor`` +--------------------- **Purpose**: Add a custom processor for logging @@ -854,8 +854,8 @@ You can also add a processor for a specific logging channel by using the You cannot use both the ``handler`` and ``channel`` attributes for the same tag as handlers are shared between all channels. -routing.loader --------------- +``routing.loader`` +------------------ **Purpose**: Register a custom service that loads routes @@ -896,8 +896,8 @@ of your configuration and tag it with ``routing.loader``: For more information, see :doc:`/routing/custom_route_loader`. -routing.expression_language_provider ------------------------------------- +``routing.expression_language_provider`` +---------------------------------------- **Purpose**: Register a provider for expression language functions in routing @@ -906,8 +906,8 @@ This tag is used to automatically register for the routing expression component. Using these providers, you can add custom functions to the routing expression language. -security.expression_language_provider -------------------------------------- +``security.expression_language_provider`` +----------------------------------------- **Purpose**: Register a provider for expression language functions in security @@ -916,8 +916,8 @@ This tag is used to automatically register :ref:`expression function providers component. Using these providers, you can add custom functions to the security expression language. -security.remember_me_aware --------------------------- +``security.remember_me_aware`` +------------------------------ **Purpose**: To allow remember me authentication @@ -932,8 +932,8 @@ and your custom authentication listener extends then your custom authentication listener will automatically have this tag applied and it will function automatically. -security.voter --------------- +``security.voter`` +------------------ **Purpose**: To add a custom voter to Symfony's authorization logic @@ -945,8 +945,8 @@ For more information, read the :doc:`/security/voters` article. .. _reference-dic-tags-serializer-encoder: -serializer.encoder ------------------- +``serializer.encoder`` +---------------------- **Purpose**: Register a new encoder in the ``serializer`` service @@ -957,8 +957,8 @@ For more details, see :doc:`/serializer`. .. _reference-dic-tags-serializer-normalizer: -serializer.normalizer ---------------------- +``serializer.normalizer`` +------------------------- **Purpose**: Register a new normalizer in the Serializer service @@ -971,8 +971,8 @@ The priorities of the default normalizers can be found in the :method:`Symfony\\Bundle\\FrameworkBundle\\DependencyInjection\\FrameworkExtension::registerSerializerConfiguration` method. -swiftmailer.default.plugin --------------------------- +``swiftmailer.default.plugin`` +------------------------------ **Purpose**: Register a custom SwiftMailer Plugin @@ -993,8 +993,8 @@ For more information on plugins, see `SwiftMailer's Plugin Documentation`_. Several SwiftMailer plugins are core to Symfony and can be activated via different configuration. For details, see :doc:`/reference/configuration/swiftmailer`. -templating.helper ------------------ +``templating.helper`` +--------------------- **Purpose**: Make your service available in PHP templates @@ -1037,8 +1037,8 @@ templates): .. _dic-tags-translation-loader: -translation.loader ------------------- +``translation.loader`` +---------------------- **Purpose**: To register a custom service that loads translations @@ -1103,8 +1103,8 @@ the ``load()`` method on your custom loader. .. _reference-dic-tags-translation-extractor: -translation.extractor ---------------------- +``translation.extractor`` +------------------------- **Purpose**: To register a custom service that extracts messages from a file @@ -1178,8 +1178,8 @@ required option: ``alias``, which defines the name of the extractor:: $container->register(CustomExtractor::class) ->addTag('translation.extractor', ['alias' => 'foo']); -translation.dumper ------------------- +``translation.dumper`` +---------------------- **Purpose**: To register a custom service that dumps messages to a file @@ -1242,8 +1242,8 @@ This is the name that's used to determine which dumper should be used. .. _reference-dic-tags-twig-extension: -twig.extension --------------- +``twig.extension`` +------------------ **Purpose**: To register a custom Twig Extension @@ -1288,8 +1288,8 @@ For information on how to create the actual Twig Extension class, see `Twig's documentation`_ on the topic or read the :doc:`/templating/twig_extension` article. -twig.loader ------------ +``twig.loader`` +--------------- **Purpose**: Register a custom service that loads Twig templates @@ -1340,16 +1340,16 @@ also register it manually: The ``priority`` is optional and its value is a positive or negative integer that defaults to ``0``. Loaders with higher numbers are tried first. -validator.constraint_validator ------------------------------- +``validator.constraint_validator`` +---------------------------------- **Purpose**: Create your own custom validation constraint This tag allows you to create and register your own custom validation constraint. For more information, read the :doc:`/validation/custom_constraint` article. -validator.initializer ---------------------- +``validator.initializer`` +------------------------- **Purpose**: Register a service that initializes objects before validation diff --git a/reference/forms/twig_reference.rst b/reference/forms/twig_reference.rst index 311f2c850f3..d3f31f3c8ec 100644 --- a/reference/forms/twig_reference.rst +++ b/reference/forms/twig_reference.rst @@ -28,8 +28,8 @@ errors, widgets, etc). .. _reference-forms-twig-form: -form(view, variables) ---------------------- +``form(view, variables)`` +~~~~~~~~~~~~~~~~~~~~~~~~~ Renders the HTML of a complete form. @@ -55,8 +55,8 @@ the other helpers to render individual parts of the form instead: .. _reference-forms-twig-start: -form_start(view, variables) ---------------------------- +``form_start(view, variables)`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Renders the start tag of a form. This helper takes care of printing the configured method and target action of the form. It will also include the @@ -69,8 +69,8 @@ correct ``enctype`` property if the form contains upload fields. .. _reference-forms-twig-end: -form_end(view, variables) -------------------------- +``form_end(view, variables)`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Renders the end tag of a form. @@ -88,8 +88,8 @@ to false: .. _reference-forms-twig-label: -form_label(view, label, variables) ----------------------------------- +``form_label(view, label, variables)`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Renders the label for the given field. You can optionally pass the specific label you want to display as the second argument. @@ -111,8 +111,8 @@ argument. .. _reference-forms-twig-errors: -form_errors(view) ------------------ +``form_errors(view)`` +~~~~~~~~~~~~~~~~~~~~~ Renders any errors for the given field. @@ -125,8 +125,8 @@ Renders any errors for the given field. .. _reference-forms-twig-widget: -form_widget(view, variables) ----------------------------- +``form_widget(view, variables)`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Renders the HTML widget of a given field. If you apply this to an entire form or collection of fields, each underlying form row will be rendered. @@ -148,8 +148,8 @@ argument. .. _reference-forms-twig-row: -form_row(view, variables) -------------------------- +``form_row(view, variables)`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Renders the "row" of a given field, which is the combination of the field's label, errors and widget. @@ -168,8 +168,8 @@ argument. .. _reference-forms-twig-rest: -form_rest(view, variables) --------------------------- +``form_rest(view, variables)`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This renders all fields that have not yet been rendered for the given form. It's a good idea to always have this somewhere inside your form as it'll @@ -188,8 +188,8 @@ condition. Read `the Twig documentation`_ for more information. .. _form-twig-selectedchoice: -selectedchoice(selected_value) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``selectedchoice(selected_value)`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This test will check if the current choice is equal to the ``selected_value`` or if the current choice is in the array (when ``selected_value`` is an @@ -201,8 +201,8 @@ array). .. _form-twig-rootform: -rootform -~~~~~~~~ +``rootform`` +~~~~~~~~~~~~ This test will check if the current ``form`` does not have a parent form view. diff --git a/reference/forms/types/birthday.rst b/reference/forms/types/birthday.rst index 04f78c8b88b..98631be0870 100644 --- a/reference/forms/types/birthday.rst +++ b/reference/forms/types/birthday.rst @@ -5,7 +5,7 @@ BirthdayType Field ================== A :doc:`DateType ` field that specializes in handling -birthdate data. +birth date data. Can be rendered as a single text box, three text boxes (month, day and year), or three select boxes. @@ -51,8 +51,8 @@ option defaults to 120 years ago to the current year. Overridden Options ------------------ -years -~~~~~ +``years`` +~~~~~~~~~ **type**: ``array`` **default**: 120 years ago to the current year @@ -68,8 +68,8 @@ These options inherit from the :doc:`DateType `: .. include:: /reference/forms/types/options/days.rst.inc -placeholder -~~~~~~~~~~~ +``placeholder`` +~~~~~~~~~~~~~~~ **type**: ``string`` | ``array`` diff --git a/reference/forms/types/button.rst b/reference/forms/types/button.rst index 62e76989a80..04b6536eeaa 100644 --- a/reference/forms/types/button.rst +++ b/reference/forms/types/button.rst @@ -28,8 +28,8 @@ The ``BaseType`` class is the parent class for both the ``button`` type and the :doc:`FormType `, but it is not part of the form type tree (i.e. it cannot be used as a form type on its own). -attr -~~~~ +``attr`` +~~~~~~~~ **type**: ``array`` **default**: ``[]`` diff --git a/reference/forms/types/choice.rst b/reference/forms/types/choice.rst index ea20f5b9af5..a21c3312416 100644 --- a/reference/forms/types/choice.rst +++ b/reference/forms/types/choice.rst @@ -156,8 +156,8 @@ To get fancier, use the `group_by`_ option. Field Options ------------- -choices -~~~~~~~ +``choices`` +~~~~~~~~~~~ **type**: ``array`` **default**: ``[]`` @@ -183,8 +183,8 @@ correct types will be assigned to the model. .. include:: /reference/forms/types/options/choice_label.rst.inc -choice_loader -~~~~~~~~~~~~~ +``choice_loader`` +~~~~~~~~~~~~~~~~~ **type**: :class:`Symfony\\Component\\Form\\ChoiceList\\Loader\\ChoiceLoaderInterface` @@ -220,8 +220,8 @@ the choice options would need to be resolved thus triggering the callback. .. include:: /reference/forms/types/options/choice_value.rst.inc -choices_as_values -~~~~~~~~~~~~~~~~~ +``choices_as_values`` +~~~~~~~~~~~~~~~~~~~~~ This option is deprecated and you should remove it from your 3.x projects (removing it will have *no* effect). For its purpose in 2.x, see the 2.7 documentation. @@ -239,8 +239,8 @@ it will have *no* effect). For its purpose in 2.x, see the 2.7 documentation. Overridden Options ------------------ -compound -~~~~~~~~ +``compound`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: same value as ``expanded`` option @@ -259,8 +259,8 @@ The actual default value of this option depends on other field options: .. include:: /reference/forms/types/options/empty_data.rst.inc :start-after: DEFAULT_PLACEHOLDER -error_bubbling -~~~~~~~~~~~~~~ +``error_bubbling`` +~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -301,32 +301,32 @@ These options inherit from the :doc:`FormType `: Field Variables --------------- -+----------------------------+--------------+-------------------------------------------------------------------+ -| Variable | Type | Usage | -+============================+==============+===================================================================+ -| multiple | ``boolean`` | The value of the `multiple`_ option. | -+----------------------------+--------------+-------------------------------------------------------------------+ -| expanded | ``boolean`` | The value of the `expanded`_ option. | -+----------------------------+--------------+-------------------------------------------------------------------+ -| preferred_choices | ``array`` | A nested array containing the ``ChoiceView`` objects of | -| | | choices which should be presented to the user with priority. | -+----------------------------+--------------+-------------------------------------------------------------------+ -| choices | ``array`` | A nested array containing the ``ChoiceView`` objects of | -| | | the remaining choices. | -+----------------------------+--------------+-------------------------------------------------------------------+ -| separator | ``string`` | The separator to use between choice groups. | -+----------------------------+--------------+-------------------------------------------------------------------+ -| placeholder | ``mixed`` | The empty value if not already in the list, otherwise | -| | | ``null``. | -+----------------------------+--------------+-------------------------------------------------------------------+ -| choice_translation_domain | ``mixed`` | ``boolean``, ``null`` or ``string`` to determine if the value | -| | | should be translated. | -+----------------------------+--------------+-------------------------------------------------------------------+ -| is_selected | ``callable`` | A callable which takes a ``ChoiceView`` and the selected value(s) | -| | | and returns whether the choice is in the selected value(s). | -+----------------------------+--------------+-------------------------------------------------------------------+ -| placeholder_in_choices | ``boolean`` | Whether the empty value is in the choice list. | -+----------------------------+--------------+-------------------------------------------------------------------+ ++-------------------------------+--------------+-------------------------------------------------------------------+ +| Variable | Type | Usage | ++===============================+==============+===================================================================+ +| ``multiple`` | ``boolean`` | The value of the `multiple`_ option. | ++-------------------------------+--------------+-------------------------------------------------------------------+ +| ``expanded`` | ``boolean`` | The value of the `expanded`_ option. | ++-------------------------------+--------------+-------------------------------------------------------------------+ +| ``preferred_choices`` | ``array`` | A nested array containing the ``ChoiceView`` objects of | +| | | choices which should be presented to the user with priority. | ++-------------------------------+--------------+-------------------------------------------------------------------+ +| ``choices`` | ``array`` | A nested array containing the ``ChoiceView`` objects of | +| | | the remaining choices. | ++-------------------------------+--------------+-------------------------------------------------------------------+ +| ``separator`` | ``string`` | The separator to use between choice groups. | ++-------------------------------+--------------+-------------------------------------------------------------------+ +| ``placeholder`` | ``mixed`` | The empty value if not already in the list, otherwise | +| | | ``null``. | ++-------------------------------+--------------+-------------------------------------------------------------------+ +| ``choice_translation_domain`` | ``mixed`` | ``boolean``, ``null`` or ``string`` to determine if the value | +| | | should be translated. | ++-------------------------------+--------------+-------------------------------------------------------------------+ +| ``is_selected`` | ``callable`` | A callable which takes a ``ChoiceView`` and the selected value(s) | +| | | and returns whether the choice is in the selected value(s). | ++-------------------------------+--------------+-------------------------------------------------------------------+ +| ``placeholder_in_choices`` | ``boolean`` | Whether the empty value is in the choice list. | ++-------------------------------+--------------+-------------------------------------------------------------------+ .. tip:: diff --git a/reference/forms/types/collection.rst b/reference/forms/types/collection.rst index 77378ad29ea..2a270336192 100644 --- a/reference/forms/types/collection.rst +++ b/reference/forms/types/collection.rst @@ -207,8 +207,8 @@ And update the template as follows: Field Options ------------- -allow_add -~~~~~~~~~ +``allow_add`` +~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -229,8 +229,8 @@ the client side. For more information, see the above example and these new objects is set correctly. If you're using Doctrine, this won't happen automatically. See the above link for more details. -allow_delete -~~~~~~~~~~~~ +``allow_delete`` +~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` @@ -252,8 +252,8 @@ For more information, see :ref:`form-collections-remove`. the main object. None of this is handled automatically. For more information, see :ref:`form-collections-remove`. -delete_empty -~~~~~~~~~~~~ +``delete_empty`` +~~~~~~~~~~~~~~~~ **type**: ``Boolean`` or ``callable`` **default**: ``false`` @@ -294,8 +294,8 @@ may define complex conditions for considering them empty. Support for using a callable for the ``delete_empty`` option was introduced in Symfony 3.4. -entry_options -~~~~~~~~~~~~~ +``entry_options`` +~~~~~~~~~~~~~~~~~ **type**: ``array`` **default**: ``[]`` @@ -321,8 +321,8 @@ type:: ], ]); -entry_type -~~~~~~~~~~ +``entry_type`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``'Symfony\Component\Form\Extension\Core\Type\TextType'`` @@ -332,8 +332,8 @@ you'd use the :doc:`EmailType `. If you want to embed a collection of some other form, pass the form type class as this option (e.g. ``MyFormType::class``). -prototype -~~~~~~~~~ +``prototype`` +~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` @@ -365,8 +365,8 @@ rendering your form, having the entire "form row" may be easier for you. For details on how to actually use this option, see the above example as well as :ref:`form-collections-new-prototype`. -prototype_data -~~~~~~~~~~~~~~ +``prototype_data`` +~~~~~~~~~~~~~~~~~~ **type**: ``mixed`` **default**: ``null`` @@ -385,8 +385,8 @@ for all entries with the `entry_options`_ option will be used:: 'prototype_data' => 'New Tag Placeholder', ]); -prototype_name -~~~~~~~~~~~~~~ +``prototype_name`` +~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``__name__`` @@ -412,8 +412,8 @@ The default value is ``[]`` (empty array). .. include:: /reference/forms/types/options/empty_data.rst.inc :start-after: DEFAULT_PLACEHOLDER -error_bubbling -~~~~~~~~~~~~~~ +``error_bubbling`` +~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` @@ -434,9 +434,9 @@ error_bubbling Field Variables --------------- -============ =========== ======================================== -Variable Type Usage -============ =========== ======================================== -allow_add ``boolean`` The value of the `allow_add`_ option. -allow_delete ``boolean`` The value of the `allow_delete`_ option. -============ =========== ======================================== +================ =========== ======================================== +Variable Type Usage +================ =========== ======================================== +``allow_add`` ``boolean`` The value of the `allow_add`_ option. +``allow_delete`` ``boolean`` The value of the `allow_delete`_ option. +================ =========== ======================================== diff --git a/reference/forms/types/country.rst b/reference/forms/types/country.rst index 85c07cb27c7..278b22759ed 100644 --- a/reference/forms/types/country.rst +++ b/reference/forms/types/country.rst @@ -53,8 +53,8 @@ the option manually, but then you should just use the ``ChoiceType`` directly. Overridden Options ------------------ -choices -~~~~~~~ +``choices`` +~~~~~~~~~~~ **default**: ``Symfony\Component\Intl\Intl::getRegionBundle()->getCountryNames()`` diff --git a/reference/forms/types/currency.rst b/reference/forms/types/currency.rst index 249003551d6..c0b3607113c 100644 --- a/reference/forms/types/currency.rst +++ b/reference/forms/types/currency.rst @@ -45,8 +45,8 @@ manually, but then you should just use the ``ChoiceType`` directly. Overridden Options ------------------ -choices -~~~~~~~ +``choices`` +~~~~~~~~~~~ **default**: ``Symfony\Component\Intl\Intl::getCurrencyBundle()->getCurrencyNames()`` diff --git a/reference/forms/types/date.rst b/reference/forms/types/date.rst index 54ede7b3259..2648d331127 100644 --- a/reference/forms/types/date.rst +++ b/reference/forms/types/date.rst @@ -62,7 +62,7 @@ field as **three different choice fields**:: 'widget' => 'choice', ]); -If your underlying date is *not* a ``DateTime`` object (e.g. it's a unix +If your underlying date is *not* a ``DateTime`` object (e.g. it's a Unix timestamp or a ``DateTimeImmutable`` object), configure the `input`_ option:: $builder->add('publishedAt', DateType::class, [ @@ -70,8 +70,8 @@ timestamp or a ``DateTimeImmutable`` object), configure the `input`_ option:: 'input' => 'datetime_immutable' ]); -Rendering a single HTML5 Textbox -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Rendering a single HTML5 Text Box +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For a better user experience, you may want to render a single text field and use some kind of "date picker" to help your user fill in the right format. To do that, @@ -139,8 +139,8 @@ Field Options .. include:: /reference/forms/types/options/days.rst.inc -placeholder -~~~~~~~~~~~ +``placeholder`` +~~~~~~~~~~~~~~~ **type**: ``string`` | ``array`` @@ -184,8 +184,8 @@ values for the year, month and day fields:: Overridden Options ------------------ -by_reference -~~~~~~~~~~~~ +``by_reference`` +~~~~~~~~~~~~~~~~ **default**: ``false`` @@ -195,8 +195,8 @@ The ``DateTime`` classes are treated as immutable objects. .. include:: /reference/forms/types/options/data_class_date.rst.inc -error_bubbling -~~~~~~~~~~~~~~ +``error_bubbling`` +~~~~~~~~~~~~~~~~~~ **default**: ``false`` @@ -222,15 +222,15 @@ These options inherit from the :doc:`FormType `: Field Variables --------------- -+--------------+------------+----------------------------------------------------------------------+ -| Variable | Type | Usage | -+==============+============+======================================================================+ -| widget | ``mixed`` | The value of the `widget`_ option. | -+--------------+------------+----------------------------------------------------------------------+ -| type | ``string`` | Only present when widget is ``single_text`` and HTML5 is activated, | -| | | contains the input type to use (``datetime``, ``date`` or ``time``). | -+--------------+------------+----------------------------------------------------------------------+ -| date_pattern | ``string`` | A string with the date format to use. | -+--------------+------------+----------------------------------------------------------------------+ ++------------------+------------+----------------------------------------------------------------------+ +| Variable | Type | Usage | ++==================+============+======================================================================+ +| ``widget`` | ``mixed`` | The value of the `widget`_ option. | ++------------------+------------+----------------------------------------------------------------------+ +| ``type`` | ``string`` | Only present when widget is ``single_text`` and HTML5 is activated, | +| | | contains the input type to use (``datetime``, ``date`` or ``time``). | ++------------------+------------+----------------------------------------------------------------------+ +| ``date_pattern`` | ``string`` | A string with the date format to use. | ++------------------+------------+----------------------------------------------------------------------+ .. _`Bootstrap Datepicker`: https://github.com/eternicode/bootstrap-datepicker diff --git a/reference/forms/types/dateinterval.rst b/reference/forms/types/dateinterval.rst index 3e780148f8a..f031ab0352d 100644 --- a/reference/forms/types/dateinterval.rst +++ b/reference/forms/types/dateinterval.rst @@ -75,8 +75,8 @@ options to show (e.g. don't show "months", but *do* show "days"):: Field Options ------------- -days -~~~~ +``days`` +~~~~~~~~ **type**: ``array`` **default**: 0 to 31 @@ -89,8 +89,8 @@ when the ``widget`` option is set to ``choice``:: // values displayed to users range from 1 to 31 (both inclusive) 'days' => array_combine(range(1, 31), range(1, 31)), -placeholder -~~~~~~~~~~~ +``placeholder`` +~~~~~~~~~~~~~~~ **type**: ``string`` or ``array`` @@ -108,8 +108,8 @@ Alternatively, you can specify a string to be displayed for the "blank" value:: 'placeholder' => ['years' => 'Years', 'months' => 'Months', 'days' => 'Days'] ]); -hours -~~~~~ +``hours`` +~~~~~~~~~ **type**: ``array`` **default**: 0 to 24 @@ -122,8 +122,8 @@ when the ``widget`` option is set to ``choice``:: // values displayed to users range from 1 to 24 (both inclusive) 'hours' => array_combine(range(1, 24), range(1, 24)), -input -~~~~~ +``input`` +~~~~~~~~~ **type**: ``string`` **default**: ``dateinterval`` @@ -137,8 +137,8 @@ your underlying object. Valid values are: The value that comes back from the form will also be normalized back into this format. -labels -~~~~~~ +``labels`` +~~~~~~~~~~ .. versionadded:: 3.3 @@ -161,8 +161,8 @@ are ``null``, so they display the "humanized version" of the child names (``Inve 'seconds' => null, ] -minutes -~~~~~~~ +``minutes`` +~~~~~~~~~~~ **type**: ``array`` **default**: 0 to 60 @@ -175,8 +175,8 @@ when the ``widget`` option is set to ``choice``:: // values displayed to users range from 1 to 60 (both inclusive) 'minutes' => array_combine(range(1, 60), range(1, 60)), -months -~~~~~~ +``months`` +~~~~~~~~~~ **type**: ``array`` **default**: 0 to 12 @@ -189,8 +189,8 @@ when the ``widget`` option is set to ``choice``:: // values displayed to users range from 1 to 12 (both inclusive) 'months' => array_combine(range(1, 12), range(1, 12)), -seconds -~~~~~~~ +``seconds`` +~~~~~~~~~~~ **type**: ``array`` **default**: 0 to 60 @@ -203,8 +203,8 @@ when the ``widget`` option is set to ``choice``:: // values displayed to users range from 1 to 60 (both inclusive) 'seconds' => array_combine(range(1, 60), range(1, 60)), -weeks -~~~~~ +``weeks`` +~~~~~~~~~ **type**: ``array`` **default**: 0 to 52 @@ -217,8 +217,8 @@ when the ``widget`` option is set to ``choice``:: // values displayed to users range from 1 to 52 (both inclusive) 'weeks' => array_combine(range(1, 52), range(1, 52)), -widget -~~~~~~ +``widget`` +~~~~~~~~~~ **type**: ``string`` **default**: ``choice`` @@ -247,8 +247,8 @@ following: will be validated against the form ``PnYnMnDTnHnMnS`` (or ``PnW`` if using only weeks). -with_days -~~~~~~~~~ +``with_days`` +~~~~~~~~~~~~~ **type**: ``Boolean`` **default**: ``true`` @@ -259,16 +259,16 @@ input to capture days. This can not be used when `with_weeks`_ is enabled. -with_hours -~~~~~~~~~~ +``with_hours`` +~~~~~~~~~~~~~~ **type**: ``Boolean`` **default**: ``false`` Whether or not to include hours in the input. This will result in an additional input to capture hours. -with_invert -~~~~~~~~~~~ +``with_invert`` +~~~~~~~~~~~~~~~ **type**: ``Boolean`` **default**: ``false`` @@ -276,32 +276,32 @@ Whether or not to include invert in the input. This will result in an additional checkbox. This can not be used when the `widget`_ option is set to ``single_text``. -with_minutes -~~~~~~~~~~~~ +``with_minutes`` +~~~~~~~~~~~~~~~~ **type**: ``Boolean`` **default**: ``false`` Whether or not to include minutes in the input. This will result in an additional input to capture minutes. -with_months -~~~~~~~~~~~ +``with_months`` +~~~~~~~~~~~~~~~ **type**: ``Boolean`` **default**: ``true`` Whether or not to include months in the input. This will result in an additional input to capture months. -with_seconds -~~~~~~~~~~~~ +``with_seconds`` +~~~~~~~~~~~~~~~~ **type**: ``Boolean`` **default**: ``false`` Whether or not to include seconds in the input. This will result in an additional input to capture seconds. -with_weeks -~~~~~~~~~~ +``with_weeks`` +~~~~~~~~~~~~~~ **type**: ``Boolean`` **default**: ``false`` @@ -312,16 +312,16 @@ input to capture weeks. This can not be used when `with_days`_ is enabled. -with_years -~~~~~~~~~~ +``with_years`` +~~~~~~~~~~~~~~ **type**: ``Boolean`` **default**: ``true`` Whether or not to include years in the input. This will result in an additional input to capture years. -years -~~~~~ +``years`` +~~~~~~~~~ **type**: ``array`` **default**: 0 to 100 @@ -354,18 +354,18 @@ These options inherit from the :doc:`form ` type: Field Variables --------------- -============ =========== ======================================== -Variable Type Usage -============ =========== ======================================== -widget ``mixed`` The value of the `widget`_ option. -with_days ``Boolean`` The value of the `with_days`_ option. -with_invert ``Boolean`` The value of the `with_invert`_ option. -with_hours ``Boolean`` The value of the `with_hours`_ option. -with_minutes ``Boolean`` The value of the `with_minutes`_ option. -with_months ``Boolean`` The value of the `with_months`_ option. -with_seconds ``Boolean`` The value of the `with_seconds`_ option. -with_weeks ``Boolean`` The value of the `with_weeks`_ option. -with_years ``Boolean`` The value of the `with_years`_ option. -============ =========== ======================================== +================ =========== ======================================== +Variable Type Usage +================ =========== ======================================== +``widget`` ``mixed`` The value of the `widget`_ option. +``with_days`` ``Boolean`` The value of the `with_days`_ option. +``with_invert`` ``Boolean`` The value of the `with_invert`_ option. +``with_hours`` ``Boolean`` The value of the `with_hours`_ option. +``with_minutes`` ``Boolean`` The value of the `with_minutes`_ option. +``with_months`` ``Boolean`` The value of the `with_months`_ option. +``with_seconds`` ``Boolean`` The value of the `with_seconds`_ option. +``with_weeks`` ``Boolean`` The value of the `with_weeks`_ option. +``with_years`` ``Boolean`` The value of the `with_years`_ option. +================ =========== ======================================== .. _`ISO 8601`: https://en.wikipedia.org/wiki/ISO_8601 diff --git a/reference/forms/types/datetime.rst b/reference/forms/types/datetime.rst index 7e81fc0b90f..3bafb96c57f 100644 --- a/reference/forms/types/datetime.rst +++ b/reference/forms/types/datetime.rst @@ -57,8 +57,8 @@ Field Options .. include:: /reference/forms/types/options/choice_translation_domain.rst.inc -date_format -~~~~~~~~~~~ +``date_format`` +~~~~~~~~~~~~~~~ **type**: ``integer`` or ``string`` **default**: ``IntlDateFormatter::MEDIUM`` @@ -69,8 +69,8 @@ for more details. The ``date_format`` option does not have any effect when the form is rendered as an HTML5 datetime input. -date_widget -~~~~~~~~~~~ +``date_widget`` +~~~~~~~~~~~~~~~ .. include:: /reference/forms/types/options/date_widget_description.rst.inc @@ -78,8 +78,8 @@ The ``date_widget`` option is ignored when the ``widget`` option is set to ``sin .. include:: /reference/forms/types/options/days.rst.inc -placeholder -~~~~~~~~~~~ +``placeholder`` +~~~~~~~~~~~~~~~ **type**: ``string`` | ``array`` @@ -105,8 +105,8 @@ values for the year, month, day, hour, minute and second fields:: ] ]); -format -~~~~~~ +``format`` +~~~~~~~~~~ **type**: ``string`` **default**: ``Symfony\Component\Form\Extension\Core\Type\DateTimeType::HTML5_FORMAT`` @@ -121,8 +121,8 @@ For more information on valid formats, see `Date/Time Format Syntax`_. .. include:: /reference/forms/types/options/html5.rst.inc -input -~~~~~ +``input`` +~~~~~~~~~ **type**: ``string`` **default**: ``datetime`` @@ -147,8 +147,8 @@ this format. .. include:: /reference/forms/types/options/seconds.rst.inc -time_widget -~~~~~~~~~~~ +``time_widget`` +~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``choice`` @@ -158,8 +158,8 @@ The ``time_widget`` option is ignored when the ``widget`` option is set to ``sin .. include:: /reference/forms/types/options/view_timezone.rst.inc -widget -~~~~~~ +``widget`` +~~~~~~~~~~ **type**: ``string`` **default**: ``null`` @@ -176,8 +176,8 @@ with the `date_widget`_ and `time_widget`_ options. Overridden Options ------------------ -by_reference -~~~~~~~~~~~~ +``by_reference`` +~~~~~~~~~~~~~~~~ **default**: ``false`` @@ -187,8 +187,8 @@ The ``DateTime`` classes are treated as immutable objects. .. include:: /reference/forms/types/options/data_class_date.rst.inc -error_bubbling -~~~~~~~~~~~~~~ +``error_bubbling`` +~~~~~~~~~~~~~~~~~~ **default**: ``false`` @@ -212,14 +212,14 @@ These options inherit from the :doc:`FormType `: Field Variables --------------- -+----------+------------+----------------------------------------------------------------------+ -| Variable | Type | Usage | -+==========+============+======================================================================+ -| widget | ``mixed`` | The value of the `widget`_ option. | -+----------+------------+----------------------------------------------------------------------+ -| type | ``string`` | Only present when widget is ``single_text`` and HTML5 is activated, | -| | | contains the input type to use (``datetime``, ``date`` or ``time``). | -+----------+------------+----------------------------------------------------------------------+ ++--------------+------------+----------------------------------------------------------------------+ +| Variable | Type | Usage | ++==============+============+======================================================================+ +| ``widget`` | ``mixed`` | The value of the `widget`_ option. | ++--------------+------------+----------------------------------------------------------------------+ +| ``type`` | ``string`` | Only present when widget is ``single_text`` and HTML5 is activated, | +| | | contains the input type to use (``datetime``, ``date`` or ``time``). | ++--------------+------------+----------------------------------------------------------------------+ .. _`datetime local`: http://w3c.github.io/html-reference/datatypes.html#form.data.datetime-local .. _`Date/Time Format Syntax`: http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index 165190707f8..4a731354ff9 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -131,8 +131,8 @@ then you can supply the ``choices`` option directly:: Field Options ------------- -choice_label -~~~~~~~~~~~~ +``choice_label`` +~~~~~~~~~~~~~~~~ **type**: ``string``, ``callable`` or :class:`Symfony\\Component\\PropertyAccess\\PropertyPath` @@ -181,8 +181,8 @@ more details, see the main :ref:`choice_label ` doc 'choice_label' => 'translations[en].name', ]); -class -~~~~~ +``class`` +~~~~~~~~~ **type**: ``string`` **required** @@ -190,16 +190,16 @@ The class of your entity (e.g. ``AppBundle:Category``). This can be a fully-qualified class name (e.g. ``AppBundle\Entity\Category``) or the short alias name (as shown prior). -em -~~ +``em`` +~~~~~~ **type**: ``string`` | ``Doctrine\Common\Persistence\ObjectManager`` **default**: the default entity manager If specified, this entity manager will be used to load the choices instead of the ``default`` entity manager. -query_builder -~~~~~~~~~~~~~ +``query_builder`` +~~~~~~~~~~~~~~~~~ **type**: ``Doctrine\ORM\QueryBuilder`` or a ``callable`` **default**: ``null`` @@ -234,8 +234,8 @@ In the ``EntityType``, this is overridden to use the ``id`` by default. When the ``id`` is used, Doctrine only queries for the objects for the ids that were actually submitted. -choices -~~~~~~~ +``choices`` +~~~~~~~~~~~ **type**: ``array`` | ``\Traversable`` **default**: ``null`` @@ -243,8 +243,8 @@ Instead of allowing the `class`_ and `query_builder`_ options to fetch the entities to include for you, you can pass the ``choices`` option directly. See :ref:`reference-forms-entity-choices`. -data_class -~~~~~~~~~~ +``data_class`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``null`` @@ -275,8 +275,8 @@ These options inherit from the :doc:`ChoiceType ` .. include:: /reference/forms/types/options/placeholder.rst.inc -preferred_choices -~~~~~~~~~~~~~~~~~ +``preferred_choices`` +~~~~~~~~~~~~~~~~~~~~~ **type**: ``array`` or ``callable`` **default**: ``[]`` diff --git a/reference/forms/types/file.rst b/reference/forms/types/file.rst index 85e8c20f275..99cad7786f9 100644 --- a/reference/forms/types/file.rst +++ b/reference/forms/types/file.rst @@ -86,8 +86,8 @@ upload associated with a Doctrine entity. Field Options ------------- -multiple -~~~~~~~~ +``multiple`` +~~~~~~~~~~~~ **type**: ``Boolean`` **default**: ``false`` @@ -98,15 +98,15 @@ Overridden Options .. include:: /reference/forms/types/options/compound_type.rst.inc -data_class -~~~~~~~~~~ +``data_class`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: :class:`Symfony\\Component\\HttpFoundation\\File\\File` This option sets the appropriate file-related data mapper to be used by the type. -empty_data -~~~~~~~~~~ +``empty_data`` +~~~~~~~~~~~~~~ **type**: ``mixed`` **default**: ``null`` @@ -140,5 +140,5 @@ Form Variables ======== ========== =============================================================================== Variable Type Usage ======== ========== =============================================================================== -type ``string`` The type variable is set to ``file``, in order to render as a file input field. +``type`` ``string`` The type variable is set to ``file``, in order to render as a file input field. ======== ========== =============================================================================== diff --git a/reference/forms/types/form.rst b/reference/forms/types/form.rst index b03732aadc4..1aae7360751 100644 --- a/reference/forms/types/form.rst +++ b/reference/forms/types/form.rst @@ -53,8 +53,8 @@ Field Options .. _form-option-allow-extra-fields: -allow_extra_fields -~~~~~~~~~~~~~~~~~~ +``allow_extra_fields`` +~~~~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/forms/types/hidden.rst b/reference/forms/types/hidden.rst index 69d56735c90..5f63c8f5772 100644 --- a/reference/forms/types/hidden.rst +++ b/reference/forms/types/hidden.rst @@ -28,15 +28,15 @@ Overridden Options .. include:: /reference/forms/types/options/compound_type.rst.inc -error_bubbling -~~~~~~~~~~~~~~ +``error_bubbling`` +~~~~~~~~~~~~~~~~~~ **default**: ``true`` Pass errors to the root form, otherwise they will not be visible. -required -~~~~~~~~ +``required`` +~~~~~~~~~~~~ **default**: ``false`` diff --git a/reference/forms/types/integer.rst b/reference/forms/types/integer.rst index db6d91bd7a5..6abac53cc1b 100644 --- a/reference/forms/types/integer.rst +++ b/reference/forms/types/integer.rst @@ -45,8 +45,8 @@ Field Options .. include:: /reference/forms/types/options/grouping.rst.inc -rounding_mode -~~~~~~~~~~~~~ +``rounding_mode`` +~~~~~~~~~~~~~~~~~ **type**: ``integer`` **default**: ``IntegerToLocalizedStringTransformer::ROUND_DOWN`` @@ -79,8 +79,8 @@ Overridden Options .. include:: /reference/forms/types/options/compound_type.rst.inc -scale -~~~~~ +``scale`` +~~~~~~~~~ **type**: ``integer`` **default**: ``0`` diff --git a/reference/forms/types/language.rst b/reference/forms/types/language.rst index 2a60be33e9e..4b40b2b1e44 100644 --- a/reference/forms/types/language.rst +++ b/reference/forms/types/language.rst @@ -55,8 +55,8 @@ manually, but then you should just use the ``ChoiceType`` directly. Overridden Options ------------------ -choices -~~~~~~~ +``choices`` +~~~~~~~~~~~ **default**: ``Symfony\Component\Intl\Intl::getLanguageBundle()->getLanguageNames()``. diff --git a/reference/forms/types/locale.rst b/reference/forms/types/locale.rst index 99998ec4104..3933594ba72 100644 --- a/reference/forms/types/locale.rst +++ b/reference/forms/types/locale.rst @@ -56,8 +56,8 @@ manually, but then you should just use the ``ChoiceType`` directly. Overridden Options ------------------ -choices -~~~~~~~ +``choices`` +~~~~~~~~~~~ **default**: ``Symfony\Component\Intl\Intl::getLocaleBundle()->getLocaleNames()`` diff --git a/reference/forms/types/money.rst b/reference/forms/types/money.rst index 07b68ea88d9..38471f2030f 100644 --- a/reference/forms/types/money.rst +++ b/reference/forms/types/money.rst @@ -43,8 +43,8 @@ how the input and output of the data is handled. Field Options ------------- -currency -~~~~~~~~ +``currency`` +~~~~~~~~~~~~ **type**: ``string`` **default**: ``EUR`` @@ -56,8 +56,8 @@ text field. This can be any `3 letter ISO 4217 code`_. You can also set this to false to hide the currency symbol. -divisor -~~~~~~~ +``divisor`` +~~~~~~~~~~~ **type**: ``integer`` **default**: ``1`` @@ -80,8 +80,8 @@ be set back on your object. .. include:: /reference/forms/types/options/grouping.rst.inc -scale -~~~~~ +``scale`` +~~~~~~~~~ **type**: ``integer`` **default**: ``2`` diff --git a/reference/forms/types/number.rst b/reference/forms/types/number.rst index 4d648ce52d8..7943d776326 100644 --- a/reference/forms/types/number.rst +++ b/reference/forms/types/number.rst @@ -41,8 +41,8 @@ Field Options .. include:: /reference/forms/types/options/grouping.rst.inc -scale -~~~~~ +``scale`` +~~~~~~~~~ **type**: ``integer`` **default**: Locale-specific (usually around ``3``) @@ -51,8 +51,8 @@ the submitted value (via ``rounding_mode``). For example, if ``scale`` is set to ``2``, a submitted value of ``20.123`` will be rounded to, for example, ``20.12`` (depending on your `rounding_mode`_). -rounding_mode -~~~~~~~~~~~~~ +``rounding_mode`` +~~~~~~~~~~~~~~~~~ **type**: ``integer`` **default**: ``NumberToLocalizedStringTransformer::ROUND_HALF_UP`` diff --git a/reference/forms/types/options/action.rst.inc b/reference/forms/types/options/action.rst.inc index a878355cc38..e20fe47ccab 100644 --- a/reference/forms/types/options/action.rst.inc +++ b/reference/forms/types/options/action.rst.inc @@ -1,5 +1,5 @@ -action -~~~~~~ +``action`` +~~~~~~~~~~ **type**: ``string`` **default**: empty string diff --git a/reference/forms/types/options/attr.rst.inc b/reference/forms/types/options/attr.rst.inc index d7ecc7e46dd..c03e17cdb43 100644 --- a/reference/forms/types/options/attr.rst.inc +++ b/reference/forms/types/options/attr.rst.inc @@ -1,5 +1,5 @@ -attr -~~~~ +``attr`` +~~~~~~~~ **type**: ``array`` **default**: ``[]`` diff --git a/reference/forms/types/options/auto_initialize.rst.inc b/reference/forms/types/options/auto_initialize.rst.inc index ab42f333438..bab8ef86e01 100644 --- a/reference/forms/types/options/auto_initialize.rst.inc +++ b/reference/forms/types/options/auto_initialize.rst.inc @@ -1,5 +1,5 @@ -auto_initialize -~~~~~~~~~~~~~~~ +``auto_initialize`` +~~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` diff --git a/reference/forms/types/options/block_name.rst.inc b/reference/forms/types/options/block_name.rst.inc index f873c1014ad..903e9809626 100644 --- a/reference/forms/types/options/block_name.rst.inc +++ b/reference/forms/types/options/block_name.rst.inc @@ -1,5 +1,5 @@ -block_name -~~~~~~~~~~ +``block_name`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: the form's name (see :ref:`Knowing which block to customize `) diff --git a/reference/forms/types/options/button_disabled.rst.inc b/reference/forms/types/options/button_disabled.rst.inc index b08ebf3f35f..5dc8767e791 100644 --- a/reference/forms/types/options/button_disabled.rst.inc +++ b/reference/forms/types/options/button_disabled.rst.inc @@ -1,5 +1,5 @@ -disabled -~~~~~~~~ +``disabled`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/forms/types/options/button_label.rst.inc b/reference/forms/types/options/button_label.rst.inc index b0f7146c7d0..623e8bf6200 100644 --- a/reference/forms/types/options/button_label.rst.inc +++ b/reference/forms/types/options/button_label.rst.inc @@ -1,5 +1,5 @@ -label -~~~~~ +``label`` +~~~~~~~~~ **type**: ``string`` **default**: The label is "guessed" from the field name diff --git a/reference/forms/types/options/button_translation_domain.rst.inc b/reference/forms/types/options/button_translation_domain.rst.inc index 56c3453f5c1..f642ea708d8 100644 --- a/reference/forms/types/options/button_translation_domain.rst.inc +++ b/reference/forms/types/options/button_translation_domain.rst.inc @@ -1,5 +1,5 @@ -translation_domain -~~~~~~~~~~~~~~~~~~ +``translation_domain`` +~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``messages`` diff --git a/reference/forms/types/options/by_reference.rst.inc b/reference/forms/types/options/by_reference.rst.inc index 257c0c5a6e4..3065cc9d9c5 100644 --- a/reference/forms/types/options/by_reference.rst.inc +++ b/reference/forms/types/options/by_reference.rst.inc @@ -1,5 +1,5 @@ -by_reference -~~~~~~~~~~~~ +``by_reference`` +~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` diff --git a/reference/forms/types/options/checkbox_compound.rst.inc b/reference/forms/types/options/checkbox_compound.rst.inc index e8e8a9c13ac..6ae8e9b55bf 100644 --- a/reference/forms/types/options/checkbox_compound.rst.inc +++ b/reference/forms/types/options/checkbox_compound.rst.inc @@ -1,5 +1,5 @@ -compound -~~~~~~~~ +``compound`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/forms/types/options/checkbox_empty_data.rst.inc b/reference/forms/types/options/checkbox_empty_data.rst.inc index 0c1c62609d3..50006ae794c 100644 --- a/reference/forms/types/options/checkbox_empty_data.rst.inc +++ b/reference/forms/types/options/checkbox_empty_data.rst.inc @@ -1,5 +1,5 @@ -empty_data -~~~~~~~~~~ +``empty_data`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``mixed`` diff --git a/reference/forms/types/options/choice_attr.rst.inc b/reference/forms/types/options/choice_attr.rst.inc index c400a83a5d9..4a91d6dacc8 100644 --- a/reference/forms/types/options/choice_attr.rst.inc +++ b/reference/forms/types/options/choice_attr.rst.inc @@ -1,5 +1,5 @@ -choice_attr -~~~~~~~~~~~ +``choice_attr`` +~~~~~~~~~~~~~~~ **type**: ``array``, ``callable`` or ``string`` **default**: ``[]`` diff --git a/reference/forms/types/options/choice_label.rst.inc b/reference/forms/types/options/choice_label.rst.inc index acc909dba7e..49eb1c20dd7 100644 --- a/reference/forms/types/options/choice_label.rst.inc +++ b/reference/forms/types/options/choice_label.rst.inc @@ -1,5 +1,5 @@ -choice_label -~~~~~~~~~~~~ +``choice_label`` +~~~~~~~~~~~~~~~~ **type**: ``string``, ``callable`` or ``false`` **default**: ``null`` diff --git a/reference/forms/types/options/choice_name.rst.inc b/reference/forms/types/options/choice_name.rst.inc index b1f09f79e82..a9cd27e4f52 100644 --- a/reference/forms/types/options/choice_name.rst.inc +++ b/reference/forms/types/options/choice_name.rst.inc @@ -1,5 +1,5 @@ -choice_name -~~~~~~~~~~~ +``choice_name`` +~~~~~~~~~~~~~~~ **type**: ``callable`` or ``string`` **default**: ``null`` diff --git a/reference/forms/types/options/choice_translation_domain.rst.inc b/reference/forms/types/options/choice_translation_domain.rst.inc index ebd6329eb04..de07057bdde 100644 --- a/reference/forms/types/options/choice_translation_domain.rst.inc +++ b/reference/forms/types/options/choice_translation_domain.rst.inc @@ -1,5 +1,5 @@ -choice_translation_domain -~~~~~~~~~~~~~~~~~~~~~~~~~ +``choice_translation_domain`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string``, ``boolean`` or ``null`` diff --git a/reference/forms/types/options/choice_type_trim.rst.inc b/reference/forms/types/options/choice_type_trim.rst.inc index 999a33ef6bc..3a8b7b0ef1c 100644 --- a/reference/forms/types/options/choice_type_trim.rst.inc +++ b/reference/forms/types/options/choice_type_trim.rst.inc @@ -1,5 +1,5 @@ -trim -~~~~ +``trim`` +~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/forms/types/options/choice_value.rst.inc b/reference/forms/types/options/choice_value.rst.inc index c2329232b09..a71ba9cdd36 100644 --- a/reference/forms/types/options/choice_value.rst.inc +++ b/reference/forms/types/options/choice_value.rst.inc @@ -1,5 +1,5 @@ -choice_value -~~~~~~~~~~~~ +``choice_value`` +~~~~~~~~~~~~~~~~ **type**: ``callable`` or ``string`` **default**: ``null`` diff --git a/reference/forms/types/options/compound.rst.inc b/reference/forms/types/options/compound.rst.inc index e73b08751c4..528c0a94da9 100644 --- a/reference/forms/types/options/compound.rst.inc +++ b/reference/forms/types/options/compound.rst.inc @@ -1,5 +1,5 @@ -compound -~~~~~~~~ +``compound`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` diff --git a/reference/forms/types/options/compound_type.rst.inc b/reference/forms/types/options/compound_type.rst.inc index 39e4abc3dfc..82097123b89 100644 --- a/reference/forms/types/options/compound_type.rst.inc +++ b/reference/forms/types/options/compound_type.rst.inc @@ -1,5 +1,5 @@ -compound -~~~~~~~~ +``compound`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/forms/types/options/constraints.rst.inc b/reference/forms/types/options/constraints.rst.inc index fa48dfb4cf1..b06343ca990 100644 --- a/reference/forms/types/options/constraints.rst.inc +++ b/reference/forms/types/options/constraints.rst.inc @@ -1,5 +1,5 @@ -constraints -~~~~~~~~~~~ +``constraints`` +~~~~~~~~~~~~~~~ **type**: ``array`` or :class:`Symfony\\Component\\Validator\\Constraint` **default**: ``null`` diff --git a/reference/forms/types/options/data.rst.inc b/reference/forms/types/options/data.rst.inc index 507d54315ca..c3562d0a8b1 100644 --- a/reference/forms/types/options/data.rst.inc +++ b/reference/forms/types/options/data.rst.inc @@ -1,5 +1,5 @@ -data -~~~~ +``data`` +~~~~~~~~ **type**: ``mixed`` **default**: Defaults to field of the underlying structure. diff --git a/reference/forms/types/options/data_class.rst.inc b/reference/forms/types/options/data_class.rst.inc index 10d6b478210..eb8c5498e39 100644 --- a/reference/forms/types/options/data_class.rst.inc +++ b/reference/forms/types/options/data_class.rst.inc @@ -1,5 +1,5 @@ -data_class -~~~~~~~~~~ +``data_class`` +~~~~~~~~~~~~~~ **type**: ``string`` diff --git a/reference/forms/types/options/data_class_date.rst.inc b/reference/forms/types/options/data_class_date.rst.inc index d11296e263f..7c9d28a68d5 100644 --- a/reference/forms/types/options/data_class_date.rst.inc +++ b/reference/forms/types/options/data_class_date.rst.inc @@ -1,5 +1,5 @@ -data_class -~~~~~~~~~~ +``data_class`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``null`` diff --git a/reference/forms/types/options/date_format.rst.inc b/reference/forms/types/options/date_format.rst.inc index ad1c2a9c718..c7874b505bd 100644 --- a/reference/forms/types/options/date_format.rst.inc +++ b/reference/forms/types/options/date_format.rst.inc @@ -1,5 +1,5 @@ -format -~~~~~~ +``format`` +~~~~~~~~~~ **type**: ``integer`` or ``string`` **default**: `IntlDateFormatter::MEDIUM`_ (or ``yyyy-MM-dd`` if `widget`_ is ``single_text``) diff --git a/reference/forms/types/options/date_input.rst.inc b/reference/forms/types/options/date_input.rst.inc index 4de4643677c..f979dd645e7 100644 --- a/reference/forms/types/options/date_input.rst.inc +++ b/reference/forms/types/options/date_input.rst.inc @@ -1,5 +1,5 @@ -input -~~~~~ +``input`` +~~~~~~~~~ **type**: ``string`` **default**: ``datetime`` diff --git a/reference/forms/types/options/date_widget.rst.inc b/reference/forms/types/options/date_widget.rst.inc index b5e7008b8bf..57f081e5b67 100644 --- a/reference/forms/types/options/date_widget.rst.inc +++ b/reference/forms/types/options/date_widget.rst.inc @@ -1,4 +1,4 @@ -widget -~~~~~~ +``widget`` +~~~~~~~~~~ .. include:: /reference/forms/types/options/date_widget_description.rst.inc diff --git a/reference/forms/types/options/days.rst.inc b/reference/forms/types/options/days.rst.inc index a8034510665..9e46a5709b5 100644 --- a/reference/forms/types/options/days.rst.inc +++ b/reference/forms/types/options/days.rst.inc @@ -1,5 +1,5 @@ -days -~~~~ +``days`` +~~~~~~~~ **type**: ``array`` **default**: 1 to 31 diff --git a/reference/forms/types/options/disabled.rst.inc b/reference/forms/types/options/disabled.rst.inc index 9338b1bc48c..8182bb1d38d 100644 --- a/reference/forms/types/options/disabled.rst.inc +++ b/reference/forms/types/options/disabled.rst.inc @@ -1,5 +1,5 @@ -disabled -~~~~~~~~ +``disabled`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/forms/types/options/empty_data.rst.inc b/reference/forms/types/options/empty_data.rst.inc index e3df385a3f9..5e0a23a70b9 100644 --- a/reference/forms/types/options/empty_data.rst.inc +++ b/reference/forms/types/options/empty_data.rst.inc @@ -1,5 +1,5 @@ -empty_data -~~~~~~~~~~ +``empty_data`` +~~~~~~~~~~~~~~ **type**: ``mixed`` diff --git a/reference/forms/types/options/error_bubbling.rst.inc b/reference/forms/types/options/error_bubbling.rst.inc index bc6bc1c5e42..b07866cdf00 100644 --- a/reference/forms/types/options/error_bubbling.rst.inc +++ b/reference/forms/types/options/error_bubbling.rst.inc @@ -1,5 +1,5 @@ -error_bubbling -~~~~~~~~~~~~~~ +``error_bubbling`` +~~~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` unless the form is ``compound`` diff --git a/reference/forms/types/options/error_mapping.rst.inc b/reference/forms/types/options/error_mapping.rst.inc index 5b1122dd5ab..37b3b204483 100644 --- a/reference/forms/types/options/error_mapping.rst.inc +++ b/reference/forms/types/options/error_mapping.rst.inc @@ -1,12 +1,12 @@ -error_mapping -~~~~~~~~~~~~~ +``error_mapping`` +~~~~~~~~~~~~~~~~~ **type**: ``array`` **default**: ``[]`` This option allows you to modify the target of a validation error. Imagine you have a custom method named ``matchingCityAndZipCode()`` that validates -whether the city and zip code match. Unfortunately, there is no "matchingCityAndZipCode" +whether the city and zip code match. Unfortunately, there is no ``matchingCityAndZipCode`` field in your form, so all that Symfony can do is display the error on top of the form. diff --git a/reference/forms/types/options/expanded.rst.inc b/reference/forms/types/options/expanded.rst.inc index d57fc7c0892..ed9f7c4fd5e 100644 --- a/reference/forms/types/options/expanded.rst.inc +++ b/reference/forms/types/options/expanded.rst.inc @@ -1,5 +1,5 @@ -expanded -~~~~~~~~ +``expanded`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/forms/types/options/extra_fields_message.rst.inc b/reference/forms/types/options/extra_fields_message.rst.inc index d130808191c..ca54c91ec54 100644 --- a/reference/forms/types/options/extra_fields_message.rst.inc +++ b/reference/forms/types/options/extra_fields_message.rst.inc @@ -1,5 +1,5 @@ -extra_fields_message -~~~~~~~~~~~~~~~~~~~~ +``extra_fields_message`` +~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``This form should not contain extra fields.`` diff --git a/reference/forms/types/options/group_by.rst.inc b/reference/forms/types/options/group_by.rst.inc index 021d3156d6d..f8ce4aea36d 100644 --- a/reference/forms/types/options/group_by.rst.inc +++ b/reference/forms/types/options/group_by.rst.inc @@ -1,5 +1,5 @@ -group_by -~~~~~~~~ +``group_by`` +~~~~~~~~~~~~ **type**: ``string`` or ``callable`` **default**: ``null`` diff --git a/reference/forms/types/options/grouping.rst.inc b/reference/forms/types/options/grouping.rst.inc index 0ebd339b2e8..564b78be04d 100644 --- a/reference/forms/types/options/grouping.rst.inc +++ b/reference/forms/types/options/grouping.rst.inc @@ -1,5 +1,5 @@ -grouping -~~~~~~~~ +``grouping`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/forms/types/options/hours.rst.inc b/reference/forms/types/options/hours.rst.inc index 2af89a163f6..8f71cfd4384 100644 --- a/reference/forms/types/options/hours.rst.inc +++ b/reference/forms/types/options/hours.rst.inc @@ -1,5 +1,5 @@ -hours -~~~~~ +``hours`` +~~~~~~~~~ **type**: ``array`` **default**: 0 to 23 diff --git a/reference/forms/types/options/html5.rst.inc b/reference/forms/types/options/html5.rst.inc index 7ddda4566bd..9353a879218 100644 --- a/reference/forms/types/options/html5.rst.inc +++ b/reference/forms/types/options/html5.rst.inc @@ -1,5 +1,5 @@ -html5 -~~~~~ +``html5`` +~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` diff --git a/reference/forms/types/options/inherit_data.rst.inc b/reference/forms/types/options/inherit_data.rst.inc index 8f916f55d24..1b63cc4b56f 100644 --- a/reference/forms/types/options/inherit_data.rst.inc +++ b/reference/forms/types/options/inherit_data.rst.inc @@ -1,5 +1,5 @@ -inherit_data -~~~~~~~~~~~~ +``inherit_data`` +~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/forms/types/options/invalid_message.rst.inc b/reference/forms/types/options/invalid_message.rst.inc index 95dd44db379..d6fcacbd036 100644 --- a/reference/forms/types/options/invalid_message.rst.inc +++ b/reference/forms/types/options/invalid_message.rst.inc @@ -1,5 +1,5 @@ -invalid_message -~~~~~~~~~~~~~~~ +``invalid_message`` +~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``This value is not valid`` diff --git a/reference/forms/types/options/invalid_message_parameters.rst.inc b/reference/forms/types/options/invalid_message_parameters.rst.inc index f4527da75c0..e9a669819d8 100644 --- a/reference/forms/types/options/invalid_message_parameters.rst.inc +++ b/reference/forms/types/options/invalid_message_parameters.rst.inc @@ -1,5 +1,5 @@ -invalid_message_parameters -~~~~~~~~~~~~~~~~~~~~~~~~~~ +``invalid_message_parameters`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``array`` **default**: ``[]`` diff --git a/reference/forms/types/options/label.rst.inc b/reference/forms/types/options/label.rst.inc index e3f66611b83..9797b6264cf 100644 --- a/reference/forms/types/options/label.rst.inc +++ b/reference/forms/types/options/label.rst.inc @@ -1,5 +1,5 @@ -label -~~~~~ +``label`` +~~~~~~~~~ **type**: ``string`` **default**: The label is "guessed" from the field name diff --git a/reference/forms/types/options/label_attr.rst.inc b/reference/forms/types/options/label_attr.rst.inc index 026a9a3ef68..ac18345e67a 100644 --- a/reference/forms/types/options/label_attr.rst.inc +++ b/reference/forms/types/options/label_attr.rst.inc @@ -1,5 +1,5 @@ -label_attr -~~~~~~~~~~ +``label_attr`` +~~~~~~~~~~~~~~ **type**: ``array`` **default**: ``[]`` diff --git a/reference/forms/types/options/label_format.rst.inc b/reference/forms/types/options/label_format.rst.inc index 6636a80a825..c45061d4be7 100644 --- a/reference/forms/types/options/label_format.rst.inc +++ b/reference/forms/types/options/label_format.rst.inc @@ -1,5 +1,5 @@ -label_format -~~~~~~~~~~~~ +``label_format`` +~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``null`` diff --git a/reference/forms/types/options/mapped.rst.inc b/reference/forms/types/options/mapped.rst.inc index c2e8972b480..ee2fa328827 100644 --- a/reference/forms/types/options/mapped.rst.inc +++ b/reference/forms/types/options/mapped.rst.inc @@ -1,5 +1,5 @@ -mapped -~~~~~~ +``mapped`` +~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` diff --git a/reference/forms/types/options/method.rst.inc b/reference/forms/types/options/method.rst.inc index 0d86d1f47a0..e5f120c2858 100644 --- a/reference/forms/types/options/method.rst.inc +++ b/reference/forms/types/options/method.rst.inc @@ -1,5 +1,5 @@ -method -~~~~~~ +``method`` +~~~~~~~~~~ **type**: ``string`` **default**: ``POST`` diff --git a/reference/forms/types/options/minutes.rst.inc b/reference/forms/types/options/minutes.rst.inc index e9e552ca047..fd27b19ceac 100644 --- a/reference/forms/types/options/minutes.rst.inc +++ b/reference/forms/types/options/minutes.rst.inc @@ -1,5 +1,5 @@ -minutes -~~~~~~~ +``minutes`` +~~~~~~~~~~~ **type**: ``array`` **default**: 0 to 59 diff --git a/reference/forms/types/options/model_timezone.rst.inc b/reference/forms/types/options/model_timezone.rst.inc index e3cdce028e9..a5fd1ee59b8 100644 --- a/reference/forms/types/options/model_timezone.rst.inc +++ b/reference/forms/types/options/model_timezone.rst.inc @@ -1,5 +1,5 @@ -model_timezone -~~~~~~~~~~~~~~ +``model_timezone`` +~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: system default timezone diff --git a/reference/forms/types/options/months.rst.inc b/reference/forms/types/options/months.rst.inc index a53c00faeb4..22fc5a04cd9 100644 --- a/reference/forms/types/options/months.rst.inc +++ b/reference/forms/types/options/months.rst.inc @@ -1,5 +1,5 @@ -months -~~~~~~ +``months`` +~~~~~~~~~~ **type**: ``array`` **default**: 1 to 12 diff --git a/reference/forms/types/options/multiple.rst.inc b/reference/forms/types/options/multiple.rst.inc index 86a72432cb3..7595b0efc90 100644 --- a/reference/forms/types/options/multiple.rst.inc +++ b/reference/forms/types/options/multiple.rst.inc @@ -1,5 +1,5 @@ -multiple -~~~~~~~~ +``multiple`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/forms/types/options/placeholder.rst.inc b/reference/forms/types/options/placeholder.rst.inc index b5b13f06844..5920cefbb52 100644 --- a/reference/forms/types/options/placeholder.rst.inc +++ b/reference/forms/types/options/placeholder.rst.inc @@ -1,5 +1,5 @@ -placeholder -~~~~~~~~~~~ +``placeholder`` +~~~~~~~~~~~~~~~ **type**: ``string`` or ``boolean`` diff --git a/reference/forms/types/options/post_max_size_message.rst.inc b/reference/forms/types/options/post_max_size_message.rst.inc index be8612e6bc1..1e895f91f72 100644 --- a/reference/forms/types/options/post_max_size_message.rst.inc +++ b/reference/forms/types/options/post_max_size_message.rst.inc @@ -1,5 +1,5 @@ -post_max_size_message -~~~~~~~~~~~~~~~~~~~~~ +``post_max_size_message`` +~~~~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``The uploaded file was too large. Please try to upload a smaller file.`` diff --git a/reference/forms/types/options/preferred_choices.rst.inc b/reference/forms/types/options/preferred_choices.rst.inc index 3d5d8567543..d1884c3456e 100644 --- a/reference/forms/types/options/preferred_choices.rst.inc +++ b/reference/forms/types/options/preferred_choices.rst.inc @@ -1,5 +1,5 @@ -preferred_choices -~~~~~~~~~~~~~~~~~ +``preferred_choices`` +~~~~~~~~~~~~~~~~~~~~~ **type**: ``array``, ``callable`` or ``string`` **default**: ``[]`` diff --git a/reference/forms/types/options/property_path.rst.inc b/reference/forms/types/options/property_path.rst.inc index 95d5f6547ca..7a41eede1af 100644 --- a/reference/forms/types/options/property_path.rst.inc +++ b/reference/forms/types/options/property_path.rst.inc @@ -1,5 +1,5 @@ -property_path -~~~~~~~~~~~~~ +``property_path`` +~~~~~~~~~~~~~~~~~ **type**: ``any`` **default**: ``the field's name`` diff --git a/reference/forms/types/options/required.rst.inc b/reference/forms/types/options/required.rst.inc index f7712114b08..41d4e347de6 100644 --- a/reference/forms/types/options/required.rst.inc +++ b/reference/forms/types/options/required.rst.inc @@ -1,5 +1,5 @@ -required -~~~~~~~~ +``required`` +~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` diff --git a/reference/forms/types/options/scale.rst.inc b/reference/forms/types/options/scale.rst.inc index 49d038bc686..0d2ec3d6dbc 100644 --- a/reference/forms/types/options/scale.rst.inc +++ b/reference/forms/types/options/scale.rst.inc @@ -1,5 +1,5 @@ -scale -~~~~~ +``scale`` +~~~~~~~~~ **type**: ``integer`` **default**: Locale-specific (usually around ``3``) diff --git a/reference/forms/types/options/seconds.rst.inc b/reference/forms/types/options/seconds.rst.inc index 7acbf39025c..d3f4dd828d1 100644 --- a/reference/forms/types/options/seconds.rst.inc +++ b/reference/forms/types/options/seconds.rst.inc @@ -1,5 +1,5 @@ -seconds -~~~~~~~ +``seconds`` +~~~~~~~~~~~ **type**: ``array`` **default**: 0 to 59 diff --git a/reference/forms/types/options/translation_domain.rst.inc b/reference/forms/types/options/translation_domain.rst.inc index a045de50214..a91b331e7a3 100644 --- a/reference/forms/types/options/translation_domain.rst.inc +++ b/reference/forms/types/options/translation_domain.rst.inc @@ -1,5 +1,5 @@ -translation_domain -~~~~~~~~~~~~~~~~~~ +``translation_domain`` +~~~~~~~~~~~~~~~~~~~~~~ **type**: ``string``, ``null`` or ``false`` **default**: ``null`` diff --git a/reference/forms/types/options/trim.rst.inc b/reference/forms/types/options/trim.rst.inc index 8d96380ee4a..a1523e95b09 100644 --- a/reference/forms/types/options/trim.rst.inc +++ b/reference/forms/types/options/trim.rst.inc @@ -1,5 +1,5 @@ -trim -~~~~ +``trim`` +~~~~~~~~ **type**: ``boolean`` **default**: ``true`` diff --git a/reference/forms/types/options/validation_groups.rst.inc b/reference/forms/types/options/validation_groups.rst.inc index edff4f733f1..dd9efcd8967 100644 --- a/reference/forms/types/options/validation_groups.rst.inc +++ b/reference/forms/types/options/validation_groups.rst.inc @@ -1,5 +1,5 @@ -validation_groups -~~~~~~~~~~~~~~~~~ +``validation_groups`` +~~~~~~~~~~~~~~~~~~~~~ **type**: ``array``, ``string``, ``callable``, :class:`Symfony\\Component\\Validator\\Constraints\\GroupSequence` or ``null`` **default**: ``null`` diff --git a/reference/forms/types/options/value.rst.inc b/reference/forms/types/options/value.rst.inc index 6c94904764f..ddbfff6660d 100644 --- a/reference/forms/types/options/value.rst.inc +++ b/reference/forms/types/options/value.rst.inc @@ -1,5 +1,5 @@ -value -~~~~~ +``value`` +~~~~~~~~~ **type**: ``mixed`` **default**: ``1`` diff --git a/reference/forms/types/options/view_timezone.rst.inc b/reference/forms/types/options/view_timezone.rst.inc index 9d94eac7277..917f519e8aa 100644 --- a/reference/forms/types/options/view_timezone.rst.inc +++ b/reference/forms/types/options/view_timezone.rst.inc @@ -1,5 +1,5 @@ -view_timezone -~~~~~~~~~~~~~ +``view_timezone`` +~~~~~~~~~~~~~~~~~ **type**: ``string`` **default**: system default timezone diff --git a/reference/forms/types/options/with_minutes.rst.inc b/reference/forms/types/options/with_minutes.rst.inc index 636a2c7a3c1..5749f1a32e1 100644 --- a/reference/forms/types/options/with_minutes.rst.inc +++ b/reference/forms/types/options/with_minutes.rst.inc @@ -1,5 +1,5 @@ -with_minutes -~~~~~~~~~~~~ +``with_minutes`` +~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` diff --git a/reference/forms/types/options/with_seconds.rst.inc b/reference/forms/types/options/with_seconds.rst.inc index a5c547fa183..fef7ac1a028 100644 --- a/reference/forms/types/options/with_seconds.rst.inc +++ b/reference/forms/types/options/with_seconds.rst.inc @@ -1,5 +1,5 @@ -with_seconds -~~~~~~~~~~~~ +``with_seconds`` +~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/forms/types/options/years.rst.inc b/reference/forms/types/options/years.rst.inc index 3c4655697f6..5749c274d66 100644 --- a/reference/forms/types/options/years.rst.inc +++ b/reference/forms/types/options/years.rst.inc @@ -1,5 +1,5 @@ -years -~~~~~ +``years`` +~~~~~~~~~ **type**: ``array`` **default**: five years before to five years after the current year diff --git a/reference/forms/types/password.rst b/reference/forms/types/password.rst index 6506f4c8605..d72a4b77728 100644 --- a/reference/forms/types/password.rst +++ b/reference/forms/types/password.rst @@ -32,8 +32,8 @@ The ``PasswordType`` field renders an input password text box. Field Options ------------- -always_empty -~~~~~~~~~~~~ +``always_empty`` +~~~~~~~~~~~~~~~~ **type**: ``boolean`` **default**: ``true`` @@ -47,8 +47,8 @@ entered into the box, set this to false and submit the form. Overridden Options ------------------ -trim -~~~~ +``trim`` +~~~~~~~~ **type**: ``boolean`` **default**: ``false`` diff --git a/reference/forms/types/percent.rst b/reference/forms/types/percent.rst index 3c1b1576499..3bd10d2ec1f 100644 --- a/reference/forms/types/percent.rst +++ b/reference/forms/types/percent.rst @@ -41,16 +41,16 @@ This field adds a percentage sign "``%``" after the input box. Field Options ------------- -scale -~~~~~ +``scale`` +~~~~~~~~~ **type**: ``integer`` **default**: ``0`` By default, the input numbers are rounded. To allow for more decimal places, use this option. -type -~~~~ +``type`` +~~~~~~~~ **type**: ``string`` **default**: ``fractional`` diff --git a/reference/forms/types/repeated.rst b/reference/forms/types/repeated.rst index d1f339b8b70..f3ac4242a91 100644 --- a/reference/forms/types/repeated.rst +++ b/reference/forms/types/repeated.rst @@ -101,8 +101,8 @@ be displayed when the two fields do not match each other. Field Options ------------- -first_name -~~~~~~~~~~ +``first_name`` +~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``first`` @@ -112,8 +112,8 @@ will be available under the key assigned to the ``RepeatedType`` field itself (e.g. ``password``). However, if you don't specify a label, this field name is used to "guess" the label for you. -first_options -~~~~~~~~~~~~~ +``first_options`` +~~~~~~~~~~~~~~~~~ **type**: ``array`` **default**: ``[]`` @@ -129,8 +129,8 @@ the label:: 'second_options' => ['label' => 'Repeat Password'], ]); -options -~~~~~~~ +``options`` +~~~~~~~~~~~ **type**: ``array`` **default**: ``[]`` @@ -140,15 +140,15 @@ types. For example, if the ``type`` option is set to ``password``, this array might contain the options ``always_empty`` or ``required`` - both options that are supported by the ``PasswordType`` field. -second_name -~~~~~~~~~~~ +``second_name`` +~~~~~~~~~~~~~~~ **type**: ``string`` **default**: ``second`` The same as ``first_name``, but for the second field. -second_options -~~~~~~~~~~~~~~ +``second_options`` +~~~~~~~~~~~~~~~~~~ **type**: ``array`` **default**: ``[]`` @@ -156,8 +156,8 @@ Additional options (will be merged into `options`_ above) that should be passed *only* to the second field. This is especially useful for customizing the label (see `first_options`_). -type -~~~~ +``type`` +~~~~~~~~ **type**: ``string`` **default**: ``Symfony\Component\Form\Extension\Core\Type\TextType`` @@ -167,8 +167,8 @@ The two underlying fields will be of this field type. For example, passing Overridden Options ------------------ -error_bubbling -~~~~~~~~~~~~~~ +``error_bubbling`` +~~~~~~~~~~~~~~~~~~ **default**: ``false`` diff --git a/reference/forms/types/reset.rst b/reference/forms/types/reset.rst index 4e5053957ef..2502d75c166 100644 --- a/reference/forms/types/reset.rst +++ b/reference/forms/types/reset.rst @@ -22,8 +22,8 @@ A button that resets all fields to their original values. Inherited Options ----------------- -attr -~~~~ +``attr`` +~~~~~~~~ **type**: ``array`` **default**: ``[]`` diff --git a/reference/forms/types/submit.rst b/reference/forms/types/submit.rst index 488224d2309..cd4cbe55cc7 100644 --- a/reference/forms/types/submit.rst +++ b/reference/forms/types/submit.rst @@ -33,8 +33,8 @@ useful when :doc:`a form has multiple submit buttons `:: Inherited Options ----------------- -attr -~~~~ +``attr`` +~~~~~~~~ **type**: ``array`` **default**: ``[]`` @@ -57,8 +57,8 @@ as a key. This can be useful when you need to set a custom class for the button: .. include:: /reference/forms/types/options/button_translation_domain.rst.inc -validation_groups -~~~~~~~~~~~~~~~~~ +``validation_groups`` +~~~~~~~~~~~~~~~~~~~~~ **type**: ``array`` **default**: ``null`` @@ -89,8 +89,8 @@ from the "Registration" are validated. Form Variables -------------- -======== =========== ============================================================== -Variable Type Usage -======== =========== ============================================================== -clicked ``boolean`` Whether the button is clicked or not. -======== =========== ============================================================== +============ =========== ============================================================== +Variable Type Usage +============ =========== ============================================================== +``clicked`` ``boolean`` Whether the button is clicked or not. +============ =========== ============================================================== diff --git a/reference/forms/types/textarea.rst b/reference/forms/types/textarea.rst index 7aaf959b00a..2ff0c5c1ebe 100644 --- a/reference/forms/types/textarea.rst +++ b/reference/forms/types/textarea.rst @@ -30,7 +30,7 @@ Renders a ``textarea`` HTML element. .. tip:: If you prefer to use an **advanced WYSIWYG editor** instead of a plain - textarea, consider using the FOSCKEditorBundle community bundle. Read + ``