mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 04:16:28 +00:00
fixed HTML extension
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
/extra/** export-ignore
|
||||||
@@ -33,7 +33,7 @@ The ``data_uri`` filter generates a URL using the data scheme as defined in RFC
|
|||||||
|
|
||||||
Then, add it on the Twig environment::
|
Then, add it on the Twig environment::
|
||||||
|
|
||||||
use Twig\Html\HtmlExtension;
|
use Twig\Extra\Html\HtmlExtension;
|
||||||
|
|
||||||
$twig = new \Twig\Environment(...);
|
$twig = new \Twig\Environment(...);
|
||||||
$twig->addExtension(new HtmlExtension());
|
$twig->addExtension(new HtmlExtension());
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ names together:
|
|||||||
|
|
||||||
Then, add it on the Twig environment::
|
Then, add it on the Twig environment::
|
||||||
|
|
||||||
use Twig\Html\HtmlExtension;
|
use Twig\Extra\Html\HtmlExtension;
|
||||||
|
|
||||||
$twig = new \Twig\Environment(...);
|
$twig = new \Twig\Environment(...);
|
||||||
$twig->addExtension(new HtmlExtension());
|
$twig->addExtension(new HtmlExtension());
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ This package is a Twig extension that provides the following:
|
|||||||
* [`html_classes`][2] function: returns a string by conditionally joining class
|
* [`html_classes`][2] function: returns a string by conditionally joining class
|
||||||
names together.
|
names together.
|
||||||
|
|
||||||
[1]: https://twig.symfony.com/doc/2.x/functions/html_classes.html
|
[1]: https://twig.symfony.com/data_uri
|
||||||
[2]: https://twig.symfony.com/doc/2.x/filters/data_uri.html
|
[2]: https://twig.symfony.com/html_classes
|
||||||
@@ -23,12 +23,12 @@
|
|||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4" : {
|
"psr-4" : {
|
||||||
"Twig\\Html\\" : "src/"
|
"Twig\\Extra\\Html\\" : "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4" : {
|
"psr-4" : {
|
||||||
"Twig\\Html\\Tests\\" : "tests/"
|
"Twig\\Extra\\Html\\Tests\\" : "tests/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Twig\Html {
|
namespace Twig\Extra\Html {
|
||||||
use Symfony\Component\Mime\MimeTypes;
|
use Symfony\Component\Mime\MimeTypes;
|
||||||
use Twig\Extension\AbstractExtension;
|
use Twig\Extension\AbstractExtension;
|
||||||
use Twig\TwigFilter;
|
use Twig\TwigFilter;
|
||||||
+2
-2
@@ -9,9 +9,9 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Twig\Intl\Tests;
|
namespace Twig\Extra\Html\Tests;
|
||||||
|
|
||||||
use Twig\Html\HtmlExtension;
|
use Twig\Extra\Html\HtmlExtension;
|
||||||
use Twig\Test\IntegrationTestCase;
|
use Twig\Test\IntegrationTestCase;
|
||||||
|
|
||||||
class IntegrationTest extends IntegrationTestCase
|
class IntegrationTest extends IntegrationTestCase
|
||||||
Reference in New Issue
Block a user