PHP code example of kibatic / ux-bundle

1. Go to this page and download the library: Download kibatic/ux-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kibatic / ux-bundle example snippets


{%   'link_url': path('my_route', {'key': 'value'}),
    'link_text': 'My link',
    'link_class': 'nice-link'
    'frame_target_top': false,
    'close_on_success': false,
} %}

{%   'btn_url': path('app_user_edit', {'id': user.id}),
    'btn_text': 'Edit',
    'btn_icon': 'edit',
    'btn_size': 'large',
    'frame_target_top': false,
    'close_on_success': false,
} %}

<button type="button" data-bs-toggle="modal" data-bs-target="#ma-modal">Plus de préférences</button>

{% embed 'common/stimulus-modal.html.twig' with {modal_id: 'ma-modal'} %}
    {% set modal_title %}Mes préférences{% endset %}
    {% set modal_content %}
        {{ form_row(form.sports) }}
        {{ form_row(form.films) }}
        {{ form_row(form.plats) }}
    {% endset %}
{% endembed %}

{%   'btn_url': path('app_user_edit', {'id': user.id}),
    'btn_text': 'Edit',
    'btn_icon': 'edit',
    'related_turbo_frames': ['#page-content', '#header-user']
} %}