Skip to content

Instantly share code, notes, and snippets.

Cálcio calcio

Block or report user

Report or block calcio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@calcio
calcio / vitrine\modules\admin\controllers\ProductController.php
Created May 27, 2018
Modificação do ProductController.php para atender as modificações no CRUD de produtos da vitrine
View vitrine\modules\admin\controllers\ProductController.php
<?php
namespace app\modules\admin\controllers;
use Yii;
use app\modules\admin\models\Product;
use app\modules\admin\models\Category;
use app\modules\admin\models\ProductSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
@calcio
calcio / vitrine\modules\admin\models\Category.php
Created May 27, 2018
Adição dos métodos getAllCategories() e getAllCategoriesAsArray() para ser usados em outros CRUDs da aplicação
View vitrine\modules\admin\models\Category.php
<?php
namespace app\modules\admin\models;
use Yii;
use yii\behaviors\TimestampBehavior;
use yii\helpers\ArrayHelper;
/**
* This is the model class for table "categories".
@calcio
calcio / vitrine\modules\admin\views\category\view.php
Created Mar 26, 2018
DetailView::widget() - arquivo view.php
View vitrine\modules\admin\views\category\view.php
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model app\modules\admin\models\Category */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Categories'), 'url' => ['index']];
View vitrine\modules\admin\views\category\index.php
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\Pjax;
use yii\jui\DatePicker;
/* @var $this yii\web\View */
/* @var $searchModel app\modules\admin\models\CategorySearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
View vitrine\modules\admin\models\CategorySearch.php
<?php
namespace app\modules\admin\models;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use app\modules\admin\models\Category;
/**
View vitrine\modules\admin\models\Category.php
<?php
namespace app\modules\admin\models;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "categories".
*
View vitrine\modules\admin\views\category\_form.php
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\modules\admin\models\Category */
/* @var $form yii\widgets\ActiveForm */
?>
View vitrine\modules\admin\models\User.php
<?php
namespace app\modules\admin\models;
use Yii;
use \yii\db\ActiveRecord;
use \yii\web\IdentityInterface;
use \yii\base\NotSupportedException;
use \yii\behaviors\TimestampBehavior;
View vitrine\views\layouts\admin.php
<?php
/* @var $this \yii\web\View */
/* @var $content string */
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use app\assets\AdminAsset;
@calcio
calcio / modules\admin\models\User.php
Created Jan 18, 2018
Modelo responsável pelo Usuário
View modules\admin\models\User.php
<?php
namespace app\modules\admin\models;
use Yii;
use \yii\db\ActiveRecord;
use \yii\web\IdentityInterface;
use \yii\base\NotSupportedException;
use \yii\behaviors\TimestampBehavior;
You can’t perform that action at this time.