{% extends '@WebProfiler/Profiler/layout.html.twig' %}

{% block toolbar %}
    {# Symfony Logo #}
    {% set icon %}
        <a href="http://symfony.com/">
            <img width="26" height="28" alt="Symfony" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAcCAMAAABIzV/hAAACZFBMVEUwLjL///////////////////////////////////////////////////////////////////+Eg4b///+Ni46Xlpj///////////+op6n///////////////////////////////////////////////////////////9ZWFv///////9qaWz///////+mpaf///////////////9ZWFv///////////////9PTVH///91dHb////////////////////g4OD///9NTE+Ih4r///////+Ni47///////92dHeRkJLk5OTLy8xlY2b///////+cm53///////+5ubr////o6Oj////////U1NT///9DQURsa22rq6ysq61hX2L///+LioxTUVVBP0NEQkZpZ2rGxsf///9ram3////s7O2SkZNfXmFxcHKmpae4uLnKysuXlpiop6l3dXiIh4pYVlmrq6ycm52trK7Nzc48Oj5dW158e36dnJ49Oz/Pz9BiYGPAv8BDQUTQz9BVU1aioaNHRUnBwcJXVVk6ODxJR0t3dnmko6U8Oj6lpKY9Oz+0tLXDwsRQTlF7en1QTlHi4eJhX2LFxcZTUVViYGNwb3J+fX83NTlFQ0dUUlW4t7icm524uLk8Oj5YVlmPjpBLSU2enZ9aWVw/PkFBP0NdW153dnk0MjZQTlE1MzdQT1JdXF9ram15eHqGhYdDQkV5eHo2NThEQkZRUFNFQ0dta244NjpGREhTUVU5NztUUlVhX2JubG9HRUlVU1ZiYGM7OTxIRkk7OT1IR0o8Oj4wLjI9Oz8YdG13AAAAynRSTlMAAAEDBAUGCgsMDQ4QEhMUGRobGx0gISIkJiYnKCktLi8wMjM0NTk6Ozw+P0NFSEpLTE5PUFBTWlteXmBiZGVmaWxtcHBxc3R0dnl5fX+BgoOGi46Pj5CRmZqanZ6eoKeoq6ytsLCwsrO0tbe5urq8vL+/wsTFx8jJycvLy8vM0NHR0tLU1NfX2NnZ2trc3N3d3eHh4uLl5ebm5ubn5+fo6urt7e3u7vDx8/Pz9PT19fX19fX29vf39/j4+fn5+vr6+vv7+/z8/f3+yR5EtwAAAbVJREFUeNpl0mVXVFEYhuF3zhkOFqMjYmCi2MUYYKGIYiJ2YCd2t4IBFqgoKjZ2jg3igI2KyO2f8sTMngGvj/te71r7wyMuk4jofZccAihcMzJKXDYnuYcVotyeYKiktV5LA0faaE7S4s7TyMsBupnMcoH/vO6gmanJaiLV1Py+Xwn5zc0fjCbSi2LI2QdkGdLyFBG+rHwMzz4BD7wyGEfFk8pfsD2TkGmyFNvFHfDj55v02VD6DcteOYylatY8oG7boA2QV4vlklzB8tU3/DIwo+dWv58guY5tRcLMtwSGdi1DkTvAn9Jqsgbu4kafRBqlV4sDFCWuIjdhMsp7yQU49rB28/QPLOu2DuWqLMfmfw6M716GskdGVRMSGDKRsEzpvZ+Qs0lFKDd94s2oArh2F7K3oNQt6ChGr5x6+Dx3J7d2E3Ygqam4PCkngRNnngYIO5cWq4lLb5t+vJ6GiifFR1nbMNqP3fSOCN8PZnQynEW5W/nmHy0PXv79eHpRSjsjtEOtWZcRc9YXlNx7VFKwceGYHjG6s0Ob3iK+X3LqlKnjkvt39rjD6w3W6BhvrCdaVw//ADrWicJIvtkmAAAAAElFTkSuQmCC" />
            <span>
                {% if collector.applicationname %}
                    {{ collector.applicationname }} {{ collector.applicationversion }}
                {% else %}
                    {{ collector.symfonyversion }}
                {% endif %}
            </span>
        </a>
    {% endset %}
    {% set text %}
        {% if collector.applicationname %}
            <div class="sf-toolbar-info-piece">
                {{ collector.applicationname }} <b>{{ collector.applicationversion }}</b>
            </div>
        {% endif %}
        <div class="sf-toolbar-info-piece">
            Symfony <b>{{ collector.symfonyversion }}</b>
        </div>
        <div class="sf-toolbar-info-piece">
            <a href="http://symfony.com/doc/{{ collector.symfonyversion }}/index.html" rel="help">Symfony Documentation</a>
        </div>
    {% endset %}
    {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %}

    {# PHP Information #}
    {% set icon %}
        <a href="{{ path('_profiler_phpinfo') }}">
            <img width="26" height="28" alt="PHP" src="data:image/png;base64, " />
        </a>
    {% endset %}
    {% set text %}
        {% spaceless %}
            <div class="sf-toolbar-info-piece sf-toolbar-info-php">
                <b>PHP</b>
                <span>{{ collector.phpversion }}</span>
            </div>
            <div class="sf-toolbar-info-piece sf-toolbar-info-php-ext">
                <b>PHP Extensions</b>
                <span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasxdebug ? 'green' : 'red' }}">xdebug</span>
                <span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasaccelerator ? 'green' : 'red' }}">accel</span>
            </div>
            <div class="sf-toolbar-info-piece">
                <b>PHP SAPI</b>
                <span>{{ collector.sapiName }}</span>
            </div>
        {% endspaceless %}
    {% endset %}
    {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %}

    {# Environment #}
    {% set debug_status_class %}sf-toolbar-status sf-toolbar-status-{{ collector.debug ? 'green' : 'red' }}{% endset %}
    {% set icon %}
        <img width="21" height="28" alt="Environment" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAcCAMAAAC5xgRsAAAAZlBMVEX///////////////////////////////////////////////////////////////////////////////////////////+ZmZmZmZlISEhJSUmdnZ1HR0fR0dFZWVlpaWlfX18/Pz+puygPAAAAIXRSTlMACwwlJygpLzIzNjs8QEtMUmd6e32AucDBw8fIydTm6u5l8MjvAAAAo0lEQVR42r2P2Q6CMBBFL6XsZRGRfZv//0nbDBNEE19MnJeTc5ILKf58ahiUwzy/AJpIWwREwQnEXRdbGCLjrO+djWRvVMiJcigxB7viGogxDdJpSmHEmCVPS7YczJvgUu+CS30IvtbNYZMvsGVo2mVpG/kbm4auiCpdcC3YPCAhSpAdUzaAn6qPKZtUT6ZSzb4bi2hdo9MQ1nX4ASjfV+/4/Z40pyCHrNTbIgAAAABJRU5ErkJggg==" />
        <span class="sf-toolbar-info-piece-additional-detail {{ debug_status_class }}"> </span>
        <span class="sf-toolbar-info-piece-additional sf-toolbar-status">{{ token }}</span>
        {% if 'n/a' != collector.appname or 'n/a' != collector.env %}
            <span class="sf-toolbar-info-piece-additional-detail">
                <span class="sf-toolbar-info-with-delimiter">{{ collector.appname }}</span>
                <span>{{ collector.env }}</span>
            </span>
        {% endif %}
    {% endset %}
    {% set text %}
        {% spaceless %}
            {% if 'n/a' != collector.appname %}
                <div class="sf-toolbar-info-piece">
                    <b>Name</b>
                    <span>{{ collector.appname }}</span>
                </div>
            {% endif %}
            {% if 'n/a' != collector.env %}
                <div class="sf-toolbar-info-piece">
                    <b>Environment</b>
                    <span>{{ collector.env }}</span>
                </div>
            {% endif %}
            {% if 'n/a' != collector.debug %}
                <div class="sf-toolbar-info-piece">
                    <b>Debug</b>
                    <span class="{{ debug_status_class }}">{{ collector.debug ? 'en' : 'dis' }}abled</span>
                </div>
            {% endif %}
            <div class="sf-toolbar-info-piece">
                <b>Token</b>
                <span>
                    {% if profiler_url %}
                        <a href="{{ profiler_url }}">{{ collector.token }}</a>
                    {% else %}
                        {{ collector.token }}
                    {% endif %}
                </span>
            </div>
        {% endspaceless %}
    {% endset %}
    {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{% endblock %}

{% block menu %}
<span class="label">
    <span class="icon"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAcCAMAAAC5xgRsAAAAZlBMVEX///////////////////////////////////////////////////////////////////////////////////////////+ZmZmZmZlISEhJSUmdnZ1HR0fR0dFZWVlpaWlfX18/Pz+puygPAAAAIXRSTlMACwwlJygpLzIzNjs8QEtMUmd6e32AucDBw8fIydTm6u5l8MjvAAAAo0lEQVR42r2P2Q6CMBBFL6XsZRGRfZv//0nbDBNEE19MnJeTc5ILKf58ahiUwzy/AJpIWwREwQnEXRdbGCLjrO+djWRvVMiJcigxB7viGogxDdJpSmHEmCVPS7YczJvgUu+CS30IvtbNYZMvsGVo2mVpG/kbm4auiCpdcC3YPCAhSpAdUzaAn6qPKZtUT6ZSzb4bi2hdo9MQ1nX4ASjfV+/4/Z40pyCHrNTbIgAAAABJRU5ErkJggg==" alt="Configuration"></span>
    <strong>Config</strong>
</span>
{% endblock %}

{% block panel %}
    <h2>Project Configuration</h2>
    <table>
        <tr>
            <th>Key</th>
            <th>Value</th>
        </tr>
        <tr>
            {% if collector.applicationname %}
                <th>Application</th>
                <td>{{ collector.applicationname }} {{ collector.applicationversion }} (on Symfony {{ collector.symfonyversion }})</td>
            {% else %}
                <th>Symfony version</th>
                <td>{{ collector.symfonyversion }}</td>
            {% endif %}
        </tr>
        {% if 'n/a' != collector.appname %}
            <tr>
                <th>Application name</th>
                <td>{{ collector.appname }}</td>
            </tr>
        {% endif %}
        {% if 'n/a' != collector.env %}
            <tr>
                <th>Environment</th>
                <td>{{ collector.env }}</td>
            </tr>
        {% endif %}
        {% if 'n/a' != collector.debug %}
            <tr>
                <th>Debug</th>
                <td>{{ collector.debug ? 'enabled' : 'disabled' }}</td>
            </tr>
        {% endif %}
    </table>

    <h2>PHP configuration</h2>
    <table>
        <tr>
            <th>Key</th>
            <th>Value</th>
        </tr>
        <tr>
            <th>PHP version</th>
            <td>{{ collector.phpversion }}</td>
        </tr>
        <tr>
            <th>Xdebug</th>
            <td>{{ collector.hasxdebug ? 'enabled' : 'disabled' }}</td>
        </tr>
        <tr>
            <th>PHP acceleration</th>
            <td>{{ collector.hasaccelerator ? 'enabled' : 'disabled' }}</td>
        </tr>
        <tr>
            <th>XCache</th>
            <td>{{ collector.hasxcache ? 'enabled' : 'disabled' }}</td>
        </tr>
        <tr>
            <th>APC</th>
            <td>{{ collector.hasapc ? 'enabled' : 'disabled' }}</td>
        </tr>
        <tr>
            <th>Zend OPcache</th>
            <td>{{ collector.haszendopcache ? 'enabled' : 'disabled' }}</td>
        </tr>
        <tr>
            <th>EAccelerator</th>
            <td>{{ collector.haseaccelerator ? 'enabled' : 'disabled' }}</td>
        </tr>
        <tr>
            <th>Full PHP configuration</th>
            <td><a href="{{ path('_profiler_phpinfo') }}"><code>phpinfo</code></a></td>
        </tr>
    </table>

    {% if collector.bundles %}
        <h2>Active bundles</h2>
        <table>
            <tr>
                <th>Name</th>
                <th>Path</th>
            </tr>
            {% set bundles = collector.bundles %}
            {% for name in bundles|keys|sort %}
            <tr>
                <th>{{ name }}</th>
                <td>{{ bundles[name] }}</td>
            </tr>
            {% endfor %}
        </table>
    {% endif %}
{% endblock %}
