Beispiel #1
0
 public function beforeAction($action)
 {
     // your custom code here, if you want the code to run before action filters,
     // wich are triggered on the [[EVENT_BEFORE_ACTION]] event, e.g. PageCache or AccessControl
     if (!parent::beforeAction($action)) {
         return false;
     }
     $view = $this->getView();
     $view->params['active'][] = $this->id;
     $view->params['active'][] = $action->id;
     ProfileUnifyAsset::register($view);
     return true;
     // or false to not run the action
 }
Beispiel #2
0
<?php

use yii\helpers\Html;
use common\assets\ProfileUnifyAsset;
ProfileUnifyAsset::register($this);
/* @var $this yii\web\View */
/* @var $model common\models\Package */
$this->title = Yii::t('app', 'Update {modelClass}: ', ['modelClass' => 'Package']) . ' ' . $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Packages'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = Yii::t('app', 'Update');
$this->params['active'] = ['manage', 'package'];
?>
<div class="package-update">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <?php 
echo $this->render('_form', ['model' => $model]);
?>

</div>
Beispiel #3
0
use dosamigos\chartjs\ChartJs;
use common\models\CampaignTracker;
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
$labels = [];
$unique = [];
$total = [];
$selected = null;
if (isset($selectedCode)) {
    $temp = CampaignTracker::ViewUniqueByDuration(8, $allCodes[$selectedCode]);
    $labels = array_keys($temp);
    $unique = array_values($temp);
    $total = array_values(CampaignTracker::ViewDailyByDuration(8, $allCodes[$selectedCode]));
    $selected = array_search($allCodes[$selectedCode], $allCodes);
}
$urlBase = ProfileUnifyAsset::register($this);
$this->params['active'] = ['profile', 'profile_me'];
/* @var $this yii\web\View */
?>

<style>
    select:not([multiple]) {
        -webkit-appearance: none;
        -moz-appearance: none;
        background-position: right 50%;
        background-repeat: no-repeat;
        background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAMCAYAAABSgIzaAAAAGXRFWHRTb2Z0d2Fy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