Найдено 162 результата

cqfmkapb
2019.12.27, 21:42
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

new.php <div class="history-balance-index"> <?= GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], ['attribute' => 'user_id', 'value' => function ($model) { return $model->user->username; } ], [ 'attribute...
cqfmkapb
2019.12.27, 21:42
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

index.php <?php use common\models\HistoryBalance; use yii\grid\GridView; use yii\helpers\ArrayHelper; use yii\helpers\Html; use yii\widgets\ListView; /* @var $this yii\web\View */ /* @var $searchModel backend\models\HistoryBalanceSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->...
cqfmkapb
2019.12.27, 21:41
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

<?php namespace backend\controllers; use Yii; use common\models\HistoryBalance; use backend\models\HistoryBalanceSearch; use yii\web\Controller; use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; /** * HistoryBalanceController implements the CRUD actions for HistoryBalance model. */ cla...
cqfmkapb
2019.12.27, 16:53
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

Unknown Property – yii\base\UnknownPropertyException
cqfmkapb
2019.12.27, 16:53
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

public function actionIndex() { $searchModel = new HistoryBalanceSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]) && $this->render('new') ; }
cqfmkapb
2019.12.27, 15:25
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

Код: Выделить всё

    <?php include __DIR__ . 'new.php'; ?>
так не работает
cqfmkapb
2019.12.27, 13:42
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

Код: Выделить всё

    <?= $this->render('new') ?>
так не работает
cqfmkapb
2019.12.27, 13:36
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

<div class="history-balance-index"> <?= GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], ['attribute' => 'user_id', 'value' => function ($model) { return $model->user->username; } ], [ 'attribute' => 'b...
cqfmkapb
2019.12.26, 16:28
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

спасибо заработало
как можно теперь один гридвью зависать в один вид и от этого вида в других видах вставить код
Чтоб не использовать повтор кода
cqfmkapb
2019.12.26, 10:41
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

public function actionView($id) { $model = $this->findModel($id); $searchModel = new HistoryBalanceSearch; $dataProvider = $searchModel->search(\Yii::$app->getRequest()->get()); $dataProvider = new ActiveDataProvider([ 'query' => HistoryBalance::find() ->andWhere(['user_id' => $username]) ->orderBy...
cqfmkapb
2019.12.26, 10:31
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

Invalid Configuration – yii\base\InvalidConfigException The "query" property must be an instance of a class that implements the QueryInterface e.g. yii\db\Query or its subclasses. <?php use common\models\HistoryBalance; use yii\data\ActiveDataProvider; use yii\grid\GridView; use yii\helper...
cqfmkapb
2019.12.26, 10:30
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

у ActiveDataProvider есть, а у GridView?
cqfmkapb
2019.12.26, 10:15
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

Invalid Configuration – yii\base\InvalidConfigException The "query" property must be an instance of a class that implements the QueryInterface e.g. yii\db\Query or its subclasses. <?php use common\models\HistoryBalance; use yii\data\ActiveDataProvider; use yii\grid\GridView; use yii\helper...
cqfmkapb
2019.12.26, 09:46
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

<?php use common\models\HistoryBalance; use yii\data\ActiveDataProvider; use yii\grid\GridView; use yii\helpers\Html; use yii\widgets\DetailView; use yii\widgets\ListView; /* @var $this yii\web\View */ /* @var $model common\models\user\Person */ $this->title = $model->id; $this->params['breadcrumbs...
cqfmkapb
2019.12.26, 09:05
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

<?php use common\models\HistoryBalance; use yii\data\ActiveDataProvider; use yii\grid\GridView; use yii\helpers\Html; use yii\widgets\DetailView; use yii\widgets\ListView; /* @var $this yii\web\View */ /* @var $model common\models\user\Person */ $this->title = $model->id; $this->params['breadcrumbs...
cqfmkapb
2019.12.26, 08:59
Форум: Общие вопросы (Yii 2.x)
Тема: ParseError syntax error, unexpected ';', expecting ']'
Ответы: 141
Просмотры: 27804

Re: ParseError syntax error, unexpected ';', expecting ']'

<?php use common\models\HistoryBalance; use yii\data\ActiveDataProvider; use yii\grid\GridView; use yii\helpers\Html; use yii\widgets\DetailView; use yii\widgets\ListView; /* @var $this yii\web\View */ /* @var $model common\models\user\Person */ $this->title = $model->id; $this->params['breadcrumbs...