<commit_before><?php

namespace app\controllers;

use Yii;
use app\models\Barismilestone;
use app\models\BarismilestoneSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use app\models\Site;
/**
 * BarismilestoneController implements the CRUD actions for Barismilestone model.
 */
class BarismilestoneController extends Controller
{
    public function behaviors()
    {
        return [
            'verbs' => [
                'class' => VerbFilter::className(),
                'actions' => [
                    'delete' => ['get'],
                ],
            ],
        ];
    }

    /**
     * Lists all Barismilestone models.
     * @return mixed
     */
    public function actionIndex()
    {
    	if (\Yii::$app->user->isGuest) {
    		return $this->redirect('/propensi1/web');
    	}
		//supaya org non guest gabisa akses yg lain
		
        $searchModel = new BarismilestoneSearch();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

		
		$data = Barismilestone::find() -> asArray()-> all();  
		//cari data all
		
		return $this->render('index', [
			//mau kirim data ke view, di view klien yg index.php
			//data yang dikirim adalah data yang didapat dari method find() diatas
			"data2"=> $data, 				
		
        ]);
    }

    /**
     * Displays a single Barismilestone model.
     * @param integer $id
     * @return mixed
     */
    public function actionView($id)
    {
    	if (\Yii::$app->user->isGuest) {
    		return $this->redirect('/propensi1/web');
    	}
		//supaya org non guest gabisa akses yg lain
		
        return $this->render('view', [
            'model' => $this->findModel($id),
        ]);
    }

    /**
     * Creates a new Barismilestone model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     * @return mixed
     */
    public function actionCreate()
    {
    	if (\Yii::$app->user->isGuest) {
    		return $this->redirect('/propensi/web');
    	}
		//supaya org non guest gabisa akses yg lain
		
        $model = new Barismilestone();

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            //return $this->redirect(['view', 'id' => $model->id]);
            return $this->redirect("/propensi/web/index.php/site/view?id=$model[siteId]");
          //  return "/propensi/web/index.php/site/view?id=$model[siteId]";
        } else {
            return $this->render('create', [
                'model' => $model,
            ]);<commit_msg>no propensi1<commit_after><?php

namespace app\controllers;

use Yii;
use app\models\Barismilestone;
use app\models\BarismilestoneSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use app\models\Site;
/**
 * BarismilestoneController implements the CRUD actions for Barismilestone model.
 */
class BarismilestoneController extends Controller
{
    public function behaviors()
    {
        return [
            'verbs' => [
                'class' => VerbFilter::className(),
                'actions' => [
                    'delete' => ['get'],
                ],
            ],
        ];
    }

    /**
     * Lists all Barismilestone models.
     * @return mixed
     */
    public function actionIndex()
    {
    	if (\Yii::$app->user->isGuest) {
    		return $this->redirect('/propensi/web');
    	}
		//supaya org non guest gabisa akses yg lain
		
        $searchModel = new BarismilestoneSearch();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

		
		$data = Barismilestone::find() -> asArray()-> all();  
		//cari data all
		
		return $this->render('index', [
			//mau kirim data ke view, di view klien yg index.php
			//data yang dikirim adalah data yang didapat dari method find() diatas
			"data2"=> $data, 				
		
        ]);
    }

    /**
     * Displays a single Barismilestone model.
     * @param integer $id
     * @return mixed
     */
    public function actionView($id)
    {
    	if (\Yii::$app->user->isGuest) {
    		return $this->redirect('/propensi/web');
    	}
		//supaya org non guest gabisa akses yg lain
		
        return $this->render('view', [
            'model' => $this->findModel($id),
        ]);
    }

    /**
     * Creates a new Barismilestone model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     * @return mixed
     */
    public function actionCreate()
    {
    	if (\Yii::$app->user->isGuest) {
    		return $this->redirect('/propensi/web');
    	}
		//supaya org non guest gabisa akses yg lain
		
        $model = new Barismilestone();

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            //return $this->redirect(['view', 'id' => $model->id]);
            return $this->redirect("/propensi/web/index.php/site/view?id=$model[siteId]");
          //  return "/propensi/web/index.php/site/view?id=$model[siteId]";
        } else {
            return $this->render('create', [
                'model' => $model,
            ]);
{'fraction_non_alphanumeric': 0.1497136085324906, 'fraction_numerical': 0.0009875567845151097, 'mean_word_length': 2.1571072319201994, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 69, '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': '7544650', 'n_tokens_mistral': 1669, 'n_tokens_neox': 1596, 'n_words': 361}