Chapters
40 Chapters
|
4:19:16
|
Login to bookmark this video
-
Course Code
Subscribe to download the code!
Subscribe to download the code!
-
This Video
Subscribe to download the video!
Subscribe to download the video!
-
Subtitles
Subscribe to download the subtitles!
Subscribe to download the subtitles!
-
Course Script
Subscribe to download the script!
Subscribe to download the script!
24.
Override all the Templates!
Scroll down to the script below, click on any sentence (including terminal blocks) to jump to that spot in the video!
Subscribe to jump to this part in the video!
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
This tutorial is built on Symfony 6 but works great on Symfony 7!
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": ">=8.2.0",
"ext-ctype": "*",
"ext-iconv": "*",
"composer/package-versions-deprecated": "^1.11", // 1.11.99.4
"doctrine/doctrine-bundle": "^2.1", // 2.5.5
"doctrine/doctrine-migrations-bundle": "^3.0", // 3.2.1
"doctrine/orm": "^2.7", // 2.10.4
"easycorp/easyadmin-bundle": "^4.0", // v4.0.2
"handcraftedinthealps/goodby-csv": "^1.4", // 1.4.0
"knplabs/knp-markdown-bundle": "dev-symfony6", // dev-symfony6
"knplabs/knp-time-bundle": "^1.11", // 1.17.0
"sensio/framework-extra-bundle": "^6.0", // v6.2.5
"stof/doctrine-extensions-bundle": "^1.4", // v1.7.0
"symfony/asset": "6.0.*", // v6.0.1
"symfony/console": "6.0.*", // v6.0.2
"symfony/dotenv": "6.0.*", // v6.0.2
"symfony/flex": "^2.0.0", // v2.4.5
"symfony/framework-bundle": "6.0.*", // v6.0.2
"symfony/mime": "6.0.*", // v6.0.2
"symfony/monolog-bundle": "^3.0", // v3.7.1
"symfony/runtime": "6.0.*", // v6.0.0
"symfony/security-bundle": "6.0.*", // v6.0.2
"symfony/stopwatch": "6.0.*", // v6.0.0
"symfony/twig-bundle": "6.0.*", // v6.0.1
"symfony/ux-chartjs": "^2.0", // v2.0.1
"symfony/webpack-encore-bundle": "^1.7", // v1.13.2
"symfony/yaml": "6.0.*", // v6.0.2
"twig/extra-bundle": "^2.12|^3.0", // v3.3.7
"twig/twig": "^2.12|^3.0" // v3.3.7
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3", // 3.4.1
"symfony/debug-bundle": "6.0.*", // v6.0.2
"symfony/maker-bundle": "^1.15", // v1.36.4
"symfony/var-dumper": "6.0.*", // v6.0.2
"symfony/web-profiler-bundle": "6.0.*", // v6.0.2
"zenstruck/foundry": "^1.1" // v1.16.0
}
}
15 Comments
Hello I hope you can help me,
I have two entities Category and CategoryTranslations
in CategoryTranslations set the description field yield TextEditorField::new('body')->setColumns(12);
in Category
yield CollectionField::new('translations')
->useEntryCrudForm()
->setColumns(12);
but when showing the Category form the text editor is not shown it is only shown when changing to the textarea type
A hug
Inspired by this tutorial, I've written a bundle, which provides layout (extends EasyAdmin/layout) using https://adminlte.io.
It's not production ready and more like an example, which can be improved. I've faced some limitations (f.e. I've must exclude app.css with empty override:
{% block head_stylesheets %}{% endblock %}) Some functionality not available, since it requires some work to extend whole layout and his features.Installing result on this course app (I'm at chapter 30): https://i.ibb.co/NNpCPKg/eal.png
Hey Yaroslavche,
Well done! This is a good example for practicing I think :)
Cheers!
If one wanted to use licensed Fontawesome icons in the admin section would this be how it could be done? Or does it require the free version?
Hey Aaron,
yes, you can use the paid version, you only need to specify the right CSS class and that should do the trick
Cheers!
There is a typo in the next challenge.
Option B says "but" instead of "both"
Cheers
Hey Julien!
Good catch! I just fixed that, and a few more minor typos in that challenge. Thank you for reporting it!
Cheers!
Hello,
I have created custom footer by overriding layout.html.twig.
When theme is switchet to dark, footer is displayed incorrectly (with white background).
What could be wrong?
Thank you
Hey Tomáš,
Most probably you're using custom css rules for your footer code, and so you need to write more extra code in css to cover dark mode colors for the css rules you're using there. It depends on how you implemented dark mode switching for your admin.
Cheers!
Hello,
I dont have custom css rules. I have only added
src/bundles/EasyAdminBundle/layout.html.twigwith this code:
Hey Tomas,
This should work, at least I would expect this too. In this case there might be a style bug in EasyAdmin. The dark mode in that bundle is pretty fresh feature that was added recently. First of all, make sure you're using the latest version available. If you still have this issue - try to use dev-master to make sure that this bug wasn't fixed in master but still does not have a release. Only then try to report this as a bug.
I hope this help!
Cheers!
Hey Victor,
I have this version of EasyAdmin Bundle installed:
"name": "easycorp/easyadmin-bundle",
"version": "v4.0.9",
I think this one is the actualy latest.
I am sorry, but I am beginner in Symfony, Composer... Could you specify how can I switch to EasyAdminBundle to dev version and eventually back?
Thank you!
Cheers!
Hey Tomas,
You're right, it's the latest for now. Sure, let's figure out together. You can find the bundle on Packagist: https://packagist.org/packa... - as you can see in the right sidebar, there's the list of available releases, but on the first row you can see "4.x-dev" - that's the key. Specify that as the version:
$ symfony composer req easycorp/easyadmin-bundle:4.x-dev
It will install the bundle using the latest commit on that branch, for me it's:
> Downloading easycorp/easyadmin-bundle (4.x-dev 025bc2b)
Cheers!
Hello Victor,
I have reported a bug. Now, its fixed in dev version! Awesome!
Cheers
Hey Tomas,
Awesome! That was a good catch ;) Thank you for taking your time and reporting this upstream! And thanks for updating the thread on its progress!
Cheers!
"Houston: no signs of life"
Start the conversation!