Skip to content

Commit

Permalink
remove getPublicDir() documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jan 9, 2020
1 parent 1f66f56 commit e3fa2e6
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions bundles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,35 +117,6 @@ database, create and validate forms, create translations for your application,
write tests and much more. Each of these has their own place and role within
the bundle.

Overridding the Bundle Directory Structure
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Some of the bundle directories are conventions that can be overridden if needed.
For example, the **public directory**, which by default is located at
``<your-bundle>/Resources/public/``, can be changed by defining the
``getPublicDir()`` method in the bundle class::

// src/Acme/TestBundle/AcmeTestBundle.php
namespace App\Acme\TestBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class AcmeTestBundle extends Bundle
{
// ...

// the returned value must be relative to the bundle root directory
// (public dir is now <your-bundle>/public/ instead of <your-bundle>/Resources/public/)
public function getPublicDir(): string
{
return 'public/';
}
}

.. versionadded:: 4.4

The ``getPublicDir()`` method was introduced in Symfony 4.4.

Learn more
----------

Expand Down

0 comments on commit e3fa2e6

Please sign in to comment.