Hey Christian H.
Yes, the validator is its own component the Symfony Validator. ApiPlatform has it already integrated, the same thing with EasyAdmin but in your Symfony app, if you are not relying on a Symfony Form ...
The validator is not API platform specific, right?
I have a strange problem: a validator that always shows a violation test-wise.
This is triggered, as expected, on an API call. The same via EasyAdmin.
But not ...
... Hi,
I'm learning to use EasyAdmin 3 (on Symfony 5) and I'm trying to use the CSV export. In this part of the tutorial there is the follow code:
`
$queryBuilder = $this->createListQueryBuilder ...
... Hi,
I'am trying the use the DateTimeFiled in easyAdmin 3.0.2 bit i'am confused. This is my config for this Field in PostCrudController under configureFields method:
`
DateTimeField::new('publishedAt ...
|
// ... lines 1 - 94
|
|
{% block main %} |
|
{% set _list_item_actions = easyadmin_get_actions_for_list_item(_entity_config.name) %} |
|
|
|
<div class="table-responsive"> |
|
<table class="table"> |
|
// ... lines 100 - 129
|
|
<tbody> |
|
{% block table_body %} |
|
{% for item in paginator.currentPageResults %} |
|
// ... line 133
|
|
<tr data-id="{{ _item_id }}"> |
|
// ... lines 135 - 143
|
|
{% if _list_item_actions|length > 0 %} |
|
// ... line 145
|
|
<td data-label="{{ _column_label }}" class="actions"> |
|
{% block item_actions %} |
|
{{ include('@EasyAdmin/default/includes/_actions.html.twig', { |
|
actions: _list_item_actions, |
|
request_parameters: _request_parameters, |
|
translation_domain: _entity_config.translation_domain, |
|
trans_parameters: _trans_parameters, |
|
item_id: _item_id |
|
}, with_context = false) }} |
|
{% endblock item_actions %} |
|
</td> |
|
{% endif %} |
|
</tr> |
|
// ... lines 159 - 164
|
|
{% endfor %} |
|
{% endblock table_body %} |
|
</tbody> |
|
</table> |
|
</div> |
|
// ... lines 170 - 189
|
|
{% endblock main %} |
|
// ... lines 191 - 244
|
See Code Block in Script
|
{% extends '@EasyAdmin/page/content.html.twig' %} |
|
|
|
{% block page_title %} |
|
Cauldron Overflow Dashboard |
|
{% endblock %} |
|
|
|
{% block main %} |
|
<div class="row"> |
|
<div class="col-6"> |
|
<h3>Latest Questions</h3> |
|
<ol> |
|
{% for question in latestQuestions %} |
|
<li> |
|
<a href="{{ path('app_question_show', {'slug': question.slug}) }}">{{ question.name }}</a> |
|
<br>- {{ question.createdAt|date }} |
|
</li> |
|
{% endfor %} |
|
</ol> |
|
</div> |
|
<div class="col-6"> |
|
<h3>Top Voted</h3> |
|
<ol> |
|
{% for question in topVoted %} |
|
<li> |
|
<a href="{{ path('app_question_show', {'slug': question.slug}) }}">{{ question.name }}</a> ({{ question.votes }}) |
|
</li> |
|
{% endfor %} |
|
</ol> |
|
</div> |
|
</div> |
|
{% endblock %} |
See Code Block in Script
... $itemActions, $item)
Also i’ve created the new folder easy_admin (app/resources/views/easy_admin) with the list.html.twig
List.html.twig looks like:
```
{% extends '@EasyAdmin/default/list.html.twig' %}
{% block ...
Hi everyone
I have project that has the latest version of EasyAdmin, and I use PostgreSQL.
My problem is the following: I have imported some data in one of my tables directly from an older database to the database ...
... looks better, strictly speaking, it shouldn't be necessary since the `IdField` is NOT shown on the edit page. So, though it's minor, I'd consider that a small bug in EasyAdmin.
2) The error is terrible :). This is ...
... just prepend field with s3 url.
2). Other big problem is that when you edit, easyadmin do not see uploaded file (what you mention about "model transformer"), so file input is empty and after sending form there is an ...
Hi, I manage to progress a bit.
I found a very convinient file for my problem : vendor/easycorp/easyadmin-bundle/src/Resources/views/crud/new.html.twig
I pasted this file's content in mapZone.html.twig.
Now, I have the ...
Hey Viktor,
yes I have been trying this out but haven't found what I'm looking for. I guess I'm just hoping that a CollectionField in EasyAdmin could contain other EasyAdmin fields.
So if I had the following entities ...
... because as you will see further, EasyAdmin put a lot of stuff in that URL, including sorting by column, search query, applied filters, etc. So, by design, it's not supposed to work with SEO urls by default, and it's an ...
... tried to access) after the login
- if user 2 is an admin (has ROLE_ADMIN), then I want him to be redirected to the /admin (easyadmin) part of the website, not the homepage or any other page
This being said, my app uses ...
|
{% extends '@EasyAdmin/default/layout.html.twig' %} |
|
|
|
{% set _content_title = 'Admin dashboard' %} |
|
|
|
{% block page_title -%} |
|
{{ _content_title }} |
|
{%- endblock %} |
|
|
|
{% block content_header %} |
|
<h1 class="title">{{ _content_title }}</h1> |
|
{% endblock %} |
|
|
|
{% block main %} |
|
<div class="row"> |
|
<div class="col-sm-4"> |
|
<div class="panel panel-primary"> |
|
<div class="panel-heading"> |
|
<h3 class="panel-title">Stats</h3> |
|
</div> |
|
|
|
<div class="panel-body"> |
|
<ul class="list-group" style="margin-left: 0;"> |
|
<li class="list-group-item"> |
|
<span class="badge">{{ genusCount }}</span> |
|
Genus count |
|
</li> |
|
|
|
<li class="list-group-item"> |
|
<span class="badge">{{ publishedGenusCount }}</span> |
|
Published genus count |
|
</li> |
|
</ul> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
<div class="col-sm-4"> |
|
<div class="panel panel-primary"> |
|
<div class="panel-heading"> |
|
<h3 class="panel-title">Chart</h3> |
|
</div> |
|
|
|
<div class="panel-body"> |
|
<script type="text/javascript" |
|
src="https://ssl.gstatic.com/trends_nrtr/1015_RC10/embed_loader.js"></script> |
|
<script type="text/javascript"> |
|
trends.embed.renderExploreWidget("TIMESERIES", { |
|
"comparisonItem": [{ |
|
"keyword": "funny cat videos", |
|
"geo": "", |
|
"time": "2012-05-17 2017-05-17" |
|
}], "category": 0, "property": "" |
|
}, { |
|
"exploreQuery": "q=funny%20cat%20videos", |
|
"guestPath": "https://trends.google.com:443/trends/embed/" |
|
}); |
|
</script> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
<div class="col-sm-4"> |
|
<div class="panel panel-primary"> |
|
<div class="panel-heading"> |
|
<h3 class="panel-title">{{ randomGenus.name }}</h3> |
|
</div> |
|
|
|
<div class="panel-body"> |
|
<p> |
|
<img src="{{ asset('images/octopus-rubescens.jpg') }}" /> |
|
</p> |
|
|
|
<p>{{ randomGenus.funFact }}</p> |
|
|
|
<a href="{{ path('easyadmin', {entity: 'Genus', action: 'show', id: randomGenus.id}) }}" |
|
class="btn btn-primary"> |
|
Show details |
|
</a> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
{% endblock %} |
See Code Block in Script
Conditionally Disabling an Action
... controller uses
it - we pass a string for the action name. Action::EDIT is a just constant that
resolves to the string "edit".
But, behind the scenes, EasyAdmin creates an Action object to represent this.
And that Action ...
Security Voter Entity Permissions
... Thanks to ->setEntityPermission(), EasyAdmin now runs every entity in this list
through the security system, passing ADMIN_USER_EDIT for each. If we were running
this security check manually in a normal Symfony app, it ...
The AssociationField
... .. excellent!
Let's do the $topic field! This is an interesting one because it's a relation
to the Topic entity. How can we handle that in EasyAdmin? With the super
powerful AssociationField. Yield AssociationField::new() and pass ...
Hey Scott S.!
Ah yes, I'm familiar with this setup! But to get this setup in EasyAdmin - with a nice user experience - you're going to need to do some work. EasyAdmin's form system works via Symfony's form system ...
... //symfony.com/bundles/ux-autocomplete/current/index.html - then just open up the `controller.json` in your `assets` directory and make sure that all the tom-select CSS files are set to `false` under `autoimport`. Then in EasyAdmin ...
369
EasyAdmin
Filter Results