protected function createModal($title, $content = null, array $buttons = [])
    {
        $modal = new Modal($title);

        $buttons = [];

        if (empty($buttons)) {
            $buttons['submit'] = [
                'id'       => 'submit',
                'label'    => 'ekyna_core.button.save',
                'icon'     => 'glyphicon glyphicon-ok',
                'cssClass' => 'btn-success',
                'autospin' => true,
            ];
        }
        if (!array_key_exists('close', $buttons)) {
            $buttons['close'] = [
                'id'       => 'close',
                'label'    => 'ekyna_core.button.cancel',
                'icon'     => 'glyphicon glyphicon-remove',
                'cssClass' => 'btn-default',
            ];
        }

        $modal->setButtons($buttons);

        if ($content) {
            $modal->setContent($content);
        }

        return $modal;
    }
protected function createModal($title, $content = null, array $buttons = [])
    {
        $modal = new Modal($title);

        $buttons = [];

        if (empty($buttons)) {
            $buttons['submit'] = [
                'id'       => 'submit',
                'label'    => 'ekyna_core.button.save',
                'icon'     => 'glyphicon glyphicon-ok',
                'cssClass' => 'btn-success',
                'autospin' => true,
            ];
        }
        if (!array_key_exists('close', $buttons)) {
            $buttons['close'] = [
                'id'       => 'close',
                'label'    => 'ekyna_core.button.cancel',
                'icon'     => 'glyphicon glyphicon-remove',
                'cssClass' => 'btn-default',
            ];
        }

        $modal->setButtons($buttons);

        if ($content) {
            $modal->setContent($content);
        }

        return $modal;
    }
protected function createModal ( $ title , $ content = null , array $ buttons = [ ] ) { $ modal = new Modal ( $ title ) ; $ buttons = [ ] ; if ( empty ( $ buttons ) ) { $ buttons [ 'submit' ] = [ 'id' => 'submit' , 'label' => 'ekyna_core.button.save' , 'icon' => 'glyphicon glyphicon-ok' , 'cssClass' => 'btn-success' , 'autospin' => true , ] ; } if ( ! array_key_exists ( 'close' , $ buttons ) ) { $ buttons [ 'close' ] = [ 'id' => 'close' , 'label' => 'ekyna_core.button.cancel' , 'icon' => 'glyphicon glyphicon-remove' , 'cssClass' => 'btn-default' , ] ; } $ modal -> setButtons ( $ buttons ) ; if ( $ content ) { $ modal -> setContent ( $ content ) ; } return $ modal ; }
Creates a modal.

@param string $title
@param mixed  $content
@param array  $buttons

@return Modal
Creates a modal .