<commit_before><?php

namespace AppVentus\Awesome\AlertifyBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use AppVentus\Awesome\AlertifyBundle\Twig\Extension\AlertifyExtension;

use AppVentus\Awesome\ShortcutsBundle\Utils\Utils ;

/**
 * AdManager controller.
 * @Route("/alertify")
 */
class AlertifyController extends Controller {
    /**
     * @Route("/confirm", name="Alertify_Confirm")
     * @Template("AvAwesomeAlertifyBundle:Modal:confirm.html.twig")
     **/
    public function ConfirmAction() {
        $request = $this->get('request');
        return array(
            'title'=>$request->get('title'),
            'body'=>$request->get('body'),
            'id'=>$request->get('id').rand(1,100)."-modal",
            'cancel_button_class'=>"btn-cancel",
            'confirm_button_class'=>"btn-primary",
            'type' => $request->get('type')
        );
    }/**
     * @Route("/ajax", name="Alertify_Ajax")
     * @Template("AvAwesomeAlertifyBundle:Modal:ajax.html.twig")
     **/
    public function AjaxAction() {
        $request = $this->get('request');
        $options = array();
        foreach($request->request->all() as $name => $option){
            $options[$name] = $option;
        }
        $this->get('session')->setFlash($request->get('main_type'), $options); 
        return array();
    }
}<commit_msg>customizable confirm.js buttons (class) cancel_button_class and confirm_button_class<commit_after><?php

namespace AppVentus\Awesome\AlertifyBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use AppVentus\Awesome\AlertifyBundle\Twig\Extension\AlertifyExtension;

use AppVentus\Awesome\ShortcutsBundle\Utils\Utils ;

/**
 * AdManager controller.
 * @Route("/alertify")
 */
class AlertifyController extends Controller {
    /**
     * @Route("/confirm", name="Alertify_Confirm")
     * @Template("AvAwesomeAlertifyBundle:Modal:confirm.html.twig")
     **/
    public function ConfirmAction() {
        $request = $this->get('request');
        return array(
            'title'=>$request->get('title'),
            'body'=>$request->get('body'),
            'id'=>$request->get('id').rand(1,100)."-modal",
            'cancel_button_class'=>$request->get('cancel_button_class', "btn-cancel"),
            'confirm_button_class'=>$request->get('confirm_button_class', "btn-primary"),
            'type' => $request->get('type')
        );
    }/**
     * @Route("/ajax", name="Alertify_Ajax")
     * @Template("AvAwesomeAlertifyBundle:Modal:ajax.html.twig")
     **/
    public function AjaxAction() {
        $request = $this->get('request');
        $options = array();
        foreach($request->request->all() as $name => $option){
            $options[$name] = $option;
        }
        $this->get('session')->setFlash($request->get('main_type'), $options);
        return array();
    }
}

{'fraction_non_alphanumeric': 0.17049075844486936, 'fraction_numerical': 0.0025493945188017845, 'mean_word_length': 3.408707865168539, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5303471', 'n_tokens_mistral': 944, 'n_tokens_neox': 919, 'n_words': 122}