Php 使用引导为HWIOAuth捆绑包创建自定义登录屏幕
现在,我的屏幕有一个外观,只是用来显示用facebook或gmail登录的按钮,就像一个如何用图标登录和集中显示屏幕的例子 多谢各位Php 使用引导为HWIOAuth捆绑包创建自定义登录屏幕,php,twitter-bootstrap,symfony,layout,hwioauthbundle,Php,Twitter Bootstrap,Symfony,Layout,Hwioauthbundle,现在,我的屏幕有一个外观,只是用来显示用facebook或gmail登录的按钮,就像一个如何用图标登录和集中显示屏幕的例子 多谢各位 {% extends '::base.html.twig' %} {% block content %} <div> {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %} {{ 'layout.logged_in_as'|trans({'%username
{% extends '::base.html.twig' %}
{% block content %}
<div>
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
{{ 'layout.logged_in_as'|trans({'%username%': app.user.username}, 'FOSUserBundle') }} |
<a href="{{ path('fos_user_security_logout') }}">
{{ 'layout.logout'|trans({}, 'FOSUserBundle') }}
</a>
{% else %}
<a href="{{ path('fos_user_security_login') }}">{{ 'layout.login'|trans({}, 'FOSUserBundle') }}</a>
{% endif %}
</div>
{% for type, messages in app.session.flashBag.all %}
{% for message in messages %}
<div class="{{ type }}">
{{ message|trans({}, 'FOSUserBundle') }}
</div>
{% endfor %}
{% endfor %}
<div>
{% block fos_user_content %}
{% endblock fos_user_content %}
</div>
{% endblock %}
如果有人需要在下面发送评论来编辑答案,我可以这样做,使其成为一个更可自定义的登录菜单。如果有人需要在下面发送评论来编辑答案,我还可以通过提供程序和控制器来处理我的用户。我真的想学习如何自定义行生成的按钮:{%rendercontroller'HWIOAuthBundle:Connect:Connect%}
<div class="customBtn"><a href="{{ path('hwi_oauth_service_redirect', {'service': 'facebook'}) }}">
{% image 'bundles/delivveweb/images/Facebook.png' %}
<img src="{{ asset_url }}">
{% endimage %}
</a></div>
<div class="customBtn"><a href="{{ path('hwi_oauth_service_redirect', {'service': 'google'}) }}">
{% image 'bundles/delivveweb/images/Google.png' %}
<img src="{{ asset_url }}">
{% endimage %}
</a></div>
<div class="customBtn"><a href="{{ path('hwi_oauth_service_redirect', {'service': 'linkedin'}) }}">
{% image 'bundles/delivveweb/images/in.png' %}
<img src="{{ asset_url }}">
{% endimage %}
</a></div>