Twig/Modal.php
public function modalFunction($sTitle = '', $sBody = '', array $aOptions = array()) {
        $this->aOptions = $aOptions;

        if (array_key_exists('options', $this->aOptions)) {
            if (array_key_exists('id', $this->aOptions['options'])) {
                $this->idModal = $this->aOptions['options']['id'];
            }

            if(array_key_exists('class', $this->aOptions['options'])) {
                //$this->classModal = $this->aOptions['options']['class'];
                $this->classModal['modal'] = isset($this->aOptions['options']['class']['modal']) ? $this->aOptions['options']['class']['modal'] : [];
                $this->classModal['modal-dialog'] = isset($this->aOptions['options']['class']['modal-dialog']) ? $this->aOptions['options']['class']['modal-dialog'] : [];
            } else {
                $this->classModal['modal'] = [];
                $this->classModal['modal-dialog'] = [];
            }
        }

        $sContenu = '<div class="modal fade ' .(implode('', $this->classModal['modal'])) .'" id="' . $this->idModal . '" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">';
        $sContenu .= '<div class="modal-dialog ' .(implode('', $this->classModal['modal-dialog'])) .'" role="document">';
        $sContenu .= '<div class="modal-content">';

        $sContenu .= $this->_getHeader($sTitle);
        $sContenu .= $this->_getBody($sBody);
        $sContenu .= $this->_getFooter();

        $sContenu .= '</div>';
        $sContenu .= '</div>';
        $sContenu .= '</div>';
        $sContenu .= $this->_getJs();
        return $sContenu;
    }
public function modalFunction($sTitle = '', $sBody = '', array $aOptions = array()) {
        $this->aOptions = $aOptions;

        if (array_key_exists('options', $this->aOptions)) {
            if (array_key_exists('id', $this->aOptions['options'])) {
                $this->idModal = $this->aOptions['options']['id'];
            }

            if(array_key_exists('class', $this->aOptions['options'])) {
                //$this->classModal = $this->aOptions['options']['class'];
                $this->classModal['modal'] = isset($this->aOptions['options']['class']['modal']) ? $this->aOptions['options']['class']['modal'] : [];
                $this->classModal['modal-dialog'] = isset($this->aOptions['options']['class']['modal-dialog']) ? $this->aOptions['options']['class']['modal-dialog'] : [];
            } else {
                $this->classModal['modal'] = [];
                $this->classModal['modal-dialog'] = [];
            }
        }

        $sContenu = '<div class="modal fade ' .(implode('', $this->classModal['modal'])) .'" id="' . $this->idModal . '" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">';
        $sContenu .= '<div class="modal-dialog ' .(implode('', $this->classModal['modal-dialog'])) .'" role="document">';
        $sContenu .= '<div class="modal-content">';

        $sContenu .= $this->_getHeader($sTitle);
        $sContenu .= $this->_getBody($sBody);
        $sContenu .= $this->_getFooter();

        $sContenu .= '</div>';
        $sContenu .= '</div>';
        $sContenu .= '</div>';
        $sContenu .= $this->_getJs();
        return $sContenu;
    }
$aOptions ['footer' => [
'text' => [],
'buttons' => [
[
'id' => "",
'class' => ["", ""] | "",
'forClose' => true|false,
'label' => ""
],
[...],
]
],
'options' => [
'id' => "",
'js' => [
'backdrop' => 'static'|false
'keyboard' => boolean,
'show' => boolean
],
'class' => [
'modal' => ['class1', 'class2', ...],
'modal-dialog' => ['class1', 'class2', ...]
]
]
]

@param string $sTitle
@param string $sBody
@param array $aOptions
@return string