Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Mar 29, 2019
1 parent 2513cb7 commit 9ba6d61
Showing 1 changed file with 10 additions and 24 deletions.
34 changes: 10 additions & 24 deletions src/controllers/AdminV3ShopCmsContentElementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,34 @@
namespace v3toys\skeeks\controllers;

use skeeks\cms\backend\actions\BackendModelAction;
use skeeks\cms\backend\actions\BackendModelUpdateAction;
use skeeks\cms\components\marketplace\models\PackageModel;
use skeeks\cms\helpers\UrlHelper;
use skeeks\cms\models\Comment;
use skeeks\cms\modules\admin\actions\AdminAction;
use skeeks\cms\modules\admin\controllers\AdminController;
use skeeks\cms\modules\admin\controllers\AdminModelEditorController;
use skeeks\cms\modules\admin\traits\AdminModelEditorStandartControllerTrait;
use skeeks\cms\shop\controllers\AdminCmsContentElementController;
use skeeks\sx\helpers\ResponseHelper;
use v3toys\skeeks\models\V3toysOrder;
use v3toys\skeeks\models\V3toysOrderStatus;
use v3toys\skeeks\models\V3toysProductContentElement;
use v3toys\skeeks\models\V3toysProductProperty;
use v3toys\skeeks\models\V3toysShippingCity;
use Yii;
use skeeks\cms\models\User;
use skeeks\cms\models\searchs\User as UserSearch;
use yii\helpers\ArrayHelper;

/**
* Class AdminV3ShopCmsContentElementController
* @package v3toys\skeeks\controllers
*/
class AdminV3ShopCmsContentElementController extends AdminCmsContentElementController
{
protected $_modelClassName = V3toysProductContentElement::class;
public $modelClassName = V3toysProductContentElement::class;

public function actions()
{
$actions = parent::actions();

if ($this->content && \Yii::$app->v3toysSettings->content_ids && in_array($this->content->id,
(array)\Yii::$app->v3toysSettings->content_ids)) {
$actions['v3project'] =
[
'class' => BackendModelAction::class,
'name' => 'Сязь с V3project',
"icon" => "fa fa-child",
"priority" => 500,
"callback" => [$this, 'actionV3project'],
];
if ($this->content && \Yii::$app->v3toysSettings->content_ids && in_array($this->content->id, (array)\Yii::$app->v3toysSettings->content_ids)) {
$actions['v3project'] = [
'class' => BackendModelAction::class,
'name' => 'Сязь с V3project',
"icon" => "fa fa-child",
"priority" => 500,
"callback" => [$this, 'actionV3project'],
];
}

return $actions;
Expand Down Expand Up @@ -90,7 +76,7 @@ public function actionV3project()
}

return $this->render('@v3toys/skeeks/views/admin-cms-content-element/v3project', [
'property' => $property
'property' => $property,
]);
}

Expand Down

0 comments on commit 9ba6d61

Please sign in to comment.