Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Cookbook] apply headline guidelines to the cookbook articles#4042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
weaverryan merged 1 commit intosymfony:2.3fromxabbuh:headline-standards-cookbook
Jul 29, 2014
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletionscookbook/assetic/apply_to_option.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
.. index::
single: Assetic; Apply filters

How to Apply an Assetic Filter to aSpecific File Extension
How to Apply an Assetic Filter to aspecific File Extension
===========================================================

Assetic filters can be applied to individual files, groups of files or even,
Expand DownExpand Up@@ -49,7 +49,7 @@ An example configuration might look like this:
),
));

Filter aSingle File
Filter asingle File
--------------------

You can now serve up a single CoffeeScript file as JavaScript from within your
Expand All@@ -75,7 +75,7 @@ templates:
This is all that's needed to compile this CoffeeScript file and serve it
as the compiled JavaScript.

FilterMultiple Files
Filtermultiple Files
---------------------

You can also combine multiple CoffeeScript files into a single output file:
Expand DownExpand Up@@ -107,7 +107,7 @@ JavaScript.

.. _cookbook-assetic-apply-to:

Filteringbased on a File Extension
FilteringBased on a File Extension
-----------------------------------

One of the great advantages of using Assetic is reducing the number of asset
Expand DownExpand Up@@ -146,7 +146,7 @@ applied to all ``.coffee`` files:
apply_to="\.coffee$" />
<assetic:node-paths>/usr/lib/node_modules/</assetic:node-path>
</assetic:config>

.. code-block:: php

// app/config/config.php
Expand Down
8 changes: 4 additions & 4 deletionscookbook/assetic/asset_management.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -159,7 +159,7 @@ the :ref:`cssrewrite <cookbook-assetic-cssrewrite>` filter.

.. _cookbook-assetic-including-image:

Includingimages
IncludingImages
~~~~~~~~~~~~~~~~

To include an image you can use the ``image`` tag.
Expand DownExpand Up@@ -422,7 +422,7 @@ into your template:
A more detailed guide about configuring and using Assetic filters as well as
details of Assetic's debug mode can be found in :doc:`/cookbook/assetic/uglifyjs`.

Controlling the URLused
Controlling the URLUsed
------------------------

If you wish to, you can control the URLs that Assetic produces. This is
Expand DownExpand Up@@ -471,7 +471,7 @@ it might be downright frustrating.
Fortunately, Assetic provides a way to dump your assets to real files, instead
of being generated dynamically.

Dumping Asset Files in the ``prod``environment
Dumping Asset Files in the ``prod``Environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In the ``prod`` environment, your JS and CSS files are represented by a single
Expand DownExpand Up@@ -500,7 +500,7 @@ This will physically generate and write each file that you need (e.g. ``/js/abcd
If you update any of your assets, you'll need to run this again to regenerate
the file.

Dumping Asset Files in the ``dev``environment
Dumping Asset Files in the ``dev``Environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

By default, each asset path generated in the ``dev`` environment is handled
Expand Down
6 changes: 3 additions & 3 deletionscookbook/assetic/jpeg_optimize.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
.. index::
single: Assetic; Image optimization

How to Use AsseticFor Image Optimization with Twig Functions
How to Use Asseticfor Image Optimization with Twig Functions
=============================================================

Amongst its many filters, Assetic has four filters which can be used for on-the-fly
Expand DownExpand Up@@ -111,7 +111,7 @@ remove these by using the ``strip_all`` option:
),
));

LoweringMaximum Quality
Loweringmaximum Quality
~~~~~~~~~~~~~~~~~~~~~~~~

The quality level of the JPEG is not affected by default. You can gain
Expand DownExpand Up@@ -152,7 +152,7 @@ image quality:
),
));

Shortersyntax: Twig Function
ShorterSyntax: Twig Function
-----------------------------

If you're using Twig, it's possible to achieve all of this with a shorter
Expand Down
4 changes: 2 additions & 2 deletionscookbook/assetic/uglifyjs.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
.. index::
single: Assetic; UglifyJS

How to Minify CSS/JS Files (using UglifyJS and UglifyCSS)
How to Minify CSS/JS Files (Using UglifyJS and UglifyCSS)
=========================================================

`UglifyJS`_ is a JavaScript parser/compressor/beautifier toolkit. It can be used
Expand DownExpand Up@@ -183,7 +183,7 @@ and :ref:`dump your assetic assets <cookbook-asetic-dump-prod>`.
rather than the common config file. For details on applying filters by
file extension, see :ref:`cookbook-assetic-apply-to`.

Install,configure anduse UglifyCSS
Install,Configure andUse UglifyCSS
------------------------------------

The usage of UglifyCSS works the same way as UglifyJS. First, make sure
Expand Down
2 changes: 1 addition & 1 deletioncookbook/bundles/best_practices.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
.. index::
single: Bundle; Best practices

How touse Best Practices for Structuring Bundles
How toUse best Practices for Structuring Bundles
=================================================

A bundle is a directory that has a well-defined structure and can host anything
Expand Down
6 changes: 3 additions & 3 deletionscookbook/bundles/extension.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@
single: Configuration; Semantic
single: Bundle; Extension configuration

How toexpose aSemantic Configuration for a Bundle
How toExpose asemantic Configuration for a Bundle
===================================================

If you open your application configuration file (usually ``app/config/config.yml``),
Expand DownExpand Up@@ -330,7 +330,7 @@ information loaded from other bundles). The goal of the ``load()`` method
is to manipulate the container, adding and configuring any methods or services
needed by your bundle.

LoadingExternal Configuration Resources
Loadingexternal Configuration Resources
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

One common thing to do is to load an external configuration file that may
Expand DownExpand Up@@ -549,7 +549,7 @@ normalization and advanced merging. You can read more about this in
You can also see it in action by checking out some of the core Configuration classes,
such as the one from the `FrameworkBundle Configuration`_ or the `TwigBundle Configuration`_.

Modifying theconfiguration of another Bundle
Modifying theConfiguration of another Bundle
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you have multiple bundles that depend on each other, it may be useful
Expand Down
2 changes: 1 addition & 1 deletioncookbook/bundles/inheritance.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
.. index::
single: Bundle; Inheritance

How touse Bundle Inheritance to Overrideparts of a Bundle
How toUse Bundle Inheritance to OverrideParts of a Bundle
===========================================================

When working with third-party bundles, you'll probably come across a situation
Expand Down
2 changes: 1 addition & 1 deletioncookbook/bundles/installation.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
.. index::
single: Bundle; Installation

How toinstall 3rdparty Bundles
How toInstall 3rdParty Bundles
================================

Most bundles provide their own installation instructions. However, the
Expand Down
4 changes: 2 additions & 2 deletionscookbook/bundles/override.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -93,7 +93,7 @@ See :doc:`/cookbook/service_container/compiler_passes` for information on how to
compiler passes. If you want to do something beyond just overriding the class -
like adding a method call - you can only use the compiler pass method.

Entities & Entitymapping
Entities & EntityMapping
-------------------------

Due to the way Doctrine works, it is not possible to override entity mapping
Expand All@@ -119,7 +119,7 @@ rather than::

.. _override-validation:

Validationmetadata
ValidationMetadata
-------------------

Symfony loads all validation configuration files from every bundle and
Expand Down
2 changes: 1 addition & 1 deletioncookbook/bundles/prepend_extension.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@
single: Configuration; Semantic
single: Bundle; Extension configuration

How tosimplify configuration of multiple Bundles
How toSimplify Configuration of multiple Bundles
=================================================

When building reusable and extensible applications, developers are often
Expand Down
14 changes: 7 additions & 7 deletionscookbook/bundles/remove.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
.. index::
single: Bundle; Removing AcmeDemoBundle

How toremove the AcmeDemoBundle
How toRemove the AcmeDemoBundle
================================

The Symfony2 Standard Edition comes with a complete demo that lives inside a
Expand All@@ -13,7 +13,7 @@ starting a project, but you'll probably want to eventually remove it.
This article uses the AcmeDemoBundle as an example, but you can use
these steps to remove any bundle.

1. Unregister thebundle in the ``AppKernel``
1. Unregister theBundle in the ``AppKernel``
---------------------------------------------

To disconnect the bundle from the framework, you should remove the bundle from
Expand All@@ -38,20 +38,20 @@ development environment and you can find it inside the if statement below::
}
}

2. Removebundle configuration
2. RemoveBundle Configuration
------------------------------

Now that Symfony doesn't know about the bundle, you need to remove any
configuration and routing configuration inside the ``app/config`` directory
that refers to the bundle.

2.1 Removebundle routing
2.1 RemoveBundle Routing
~~~~~~~~~~~~~~~~~~~~~~~~~

The routing for the AcmeDemoBundle can be found in ``app/config/routing_dev.yml``.
Remove the ``_acme_demo`` entry at the bottom of this file.

2.2 Removebundle configuration
2.2 RemoveBundle Configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Some bundles contain configuration in one of the ``app/config/config*.yml``
Expand All@@ -65,7 +65,7 @@ used in the configuration for the ``app/config/security.yml`` file. You can
use it as a boilerplate for your own security, but you **can** also remove
everything: it doesn't matter to Symfony if you remove it or not.

3. Remove thebundle from the Filesystem
3. Remove theBundle from the Filesystem
----------------------------------------

Now you have removed every reference to the bundle in your application, you
Expand All@@ -81,7 +81,7 @@ can remove the ``Acme`` directory as well.

echo $this->container->get('kernel')->getBundle('AcmeDemoBundle')->getPath();

4. Removeintegration in otherbundles
4. RemoveIntegration in otherBundles
--------------------------------------

.. note::
Expand Down
4 changes: 2 additions & 2 deletionscookbook/cache/varnish.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
.. index::
single: Cache; Varnish

How touse Varnish tospeed up my Website
How toUse Varnish toSpeed up my Website
=========================================

Because Symfony2's cache uses the standard HTTP cache headers, the
Expand DownExpand Up@@ -62,7 +62,7 @@ Symfony2 adds automatically:
// For Varnish < 3.0
// esi;
}
/* By default Varnish ignores Cache-Control: nocache
/* By default Varnish ignores Cache-Control: nocache
(https://www.varnish-cache.org/docs/3.0/tutorial/increasing_your_hitrate.html#cache-control),
so in order avoid caching it has to be done explicitly */
if (beresp.http.Pragma ~ "no-cache" ||
Expand Down
6 changes: 3 additions & 3 deletionscookbook/configuration/apache_router.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
.. index::
single: Apache Router

How touse the Apache Router
How toUse the Apache Router
============================

Symfony2, while fast out of the box, also provides various ways to increase that speed with a little bit of tweaking.
Expand DownExpand Up@@ -49,7 +49,7 @@ Symfony2 to use the ``ApacheUrlMatcher`` instead of the default one:
at the end of ``ApacheUrlMatcher::match()`` a call to ``parent::match()``
is done).

Generating mod_rewriterules
Generating mod_rewriteRules
----------------------------

To test that it's working, create a very basic route for the AcmeDemoBundle:
Expand DownExpand Up@@ -119,7 +119,7 @@ it should look like this:
That's it!
You're now all set to use Apache routes.

Additionaltweaks
AdditionalTweaks
-----------------

To save a little bit of processing time, change occurrences of ``Request``
Expand Down
10 changes: 5 additions & 5 deletionscookbook/configuration/environments.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@ optimized for speed.
.. index::
single: Environments; Configuration files

Different Environments,Different Configuration Files
Different Environments,different Configuration Files
-----------------------------------------------------

A typical Symfony2 application begins with three environments: ``dev``,
Expand DownExpand Up@@ -125,7 +125,7 @@ activated by modifying the default value in the ``dev`` configuration file:
.. index::
single: Environments; Executing different environments

Executing an Application inDifferent Environments
Executing an Application indifferent Environments
--------------------------------------------------

To execute the application in each environment, load up the application using
Expand All@@ -147,7 +147,7 @@ If you open up one of these files, you'll quickly see that the environment
used by each is explicitly set::

// web/app.php
// ...
// ...

$kernel = new AppKernel('prod', false);

Expand DownExpand Up@@ -215,7 +215,7 @@ environment by using this code and changing the environment string.
.. index::
single: Environments; Creating a new environment

Creating aNew Environment
Creating anew Environment
--------------------------

By default, a Symfony2 application has three environments that handle most
Expand DownExpand Up@@ -345,7 +345,7 @@ includes the following:
You can easily change the directory location and name. For more information
read the article :doc:`/cookbook/configuration/override_dir_structure`.

GoingFurther
Goingfurther
-------------

Read the article on :doc:`/cookbook/configuration/external_parameters`.
2 changes: 1 addition & 1 deletioncookbook/configuration/external_parameters.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
.. index::
single: Environments; External parameters

How to SetExternal Parameters in the Service Container
How to Setexternal Parameters in the Service Container
=======================================================

In the chapter :doc:`/cookbook/configuration/environments`, you learned how
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@
single: How the front controller, ``AppKernel`` and environments
work together

Understanding how the Front Controller, Kernel and Environmentswork together
Understanding how the Front Controller, Kernel and EnvironmentsWork together
=============================================================================

The section :doc:`/cookbook/configuration/environments` explained the basics
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp