Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

add icon to symfony profiler #193

Merged
merged 2 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- [GH#180](https://github.com/jolicode/automapper/pull/180) Add configuration to generate code with strict types
- [GH#183](https://github.com/jolicode/automapper/pull/183) Ability to change reload strategy from AutoMapper::create()
- [GH#193](https://github.com/jolicode/automapper/pull/193) add icon to symfony profiler

### Fixed
- [GH#184](https://github.com/jolicode/automapper/pull/184) Fix error when mapping from stdClass to constructor with nullable/optional arguments
Expand Down
13 changes: 13 additions & 0 deletions src/Symfony/Bundle/Resources/views/DataCollector/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 19 additions & 17 deletions src/Symfony/Bundle/Resources/views/DataCollector/metadata.html.twig
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
{% extends '@WebProfiler/Profiler/layout.html.twig' %}

{% block toolbar %}
{% set text %}
{% if collector.metadatas|length == 0 %}
<div class="sf-toolbar-info-piece">
<b>AutoMapper</b>
<span>No Mapper</span>
</div>
{% endif %}
{% for metadata in collector.metadatas %}
<div class="sf-toolbar-info-piece">
<b>AutoMapper</b>
<span>{{ metadata.source }} to {{ metadata.target }}</span>
</div>
{% endfor %}
{% endset %}

{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': true }) }}
{% if collector.metadatas|length > 0 %}
{% set icon %}
{{ source('@AutoMapper/DataCollector/icon.svg') }}
<span class="sf-toolbar-value">{{ collector.metadatas|length }}</span>
{% endset %}

{% set text %}
{% for metadata in collector.metadatas %}
<div class="sf-toolbar-info-piece">
<b>AutoMapper</b>
<span>{{ metadata.source }} to {{ metadata.target }}</span>
</div>
{% endfor %}
{% endset %}

{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': true }) }}
{% endif %}
{% endblock %}

{% block menu %}
<span class="label{{ collector.metadatas|length > 0 ? '' : ' disabled' }}">
<span class="icon">{{ source('@AutoMapper/DataCollector/icon.svg') }}</span>
<strong>AutoMapper</strong>
{% if collector.metadatas|length > 0 %}
<span class="count">
Expand Down Expand Up @@ -185,4 +187,4 @@
{% endfor %}
</div>
{% endif %}
{% endblock %}
{% endblock %}