Добавил подключение Entity для CategoryFee

parent f4b8016d
...@@ -32,6 +32,8 @@ use App\Model\Users; ...@@ -32,6 +32,8 @@ use App\Model\Users;
use App\Model\Statistics; use App\Model\Statistics;
use App\Model\Providers; use App\Model\Providers;
use App\Model\Feeds\Feeds; use App\Model\Feeds\Feeds;
use App\Model\Feeds\CategoryFees;
use App\Entity\Feeds\CategoryFee;
use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;
use Zend\Diactoros\Response\HtmlResponse; use Zend\Diactoros\Response\HtmlResponse;
...@@ -82,7 +84,6 @@ class Cabinet extends Common ...@@ -82,7 +84,6 @@ class Cabinet extends Common
} }
return $response; return $response;
//} else {
} }
elseif($request->getAttribute('action') == self::ACTION_STAT) elseif($request->getAttribute('action') == self::ACTION_STAT)
{ {
...@@ -381,6 +382,7 @@ class Cabinet extends Common ...@@ -381,6 +382,7 @@ class Cabinet extends Common
/** @var DelegatingHydrator $hydrator */ /** @var DelegatingHydrator $hydrator */
$hydrator = $this->container->get(DelegatingHydrator::class); $hydrator = $this->container->get(DelegatingHydrator::class);
foreach ($cats_id as $cat) { foreach ($cats_id as $cat) {
$category_fee = $categoryFeesModel->findOne(['CatID' => $cat]); $category_fee = $categoryFeesModel->findOne(['CatID' => $cat]);
...@@ -395,7 +397,9 @@ class Cabinet extends Common ...@@ -395,7 +397,9 @@ class Cabinet extends Common
throw new \Exception('DB error'); throw new \Exception('DB error');
} }
} else { } else {
$cat_item = $cats[$cat]; $cat_item = $cats[$cat];
$data = array( $data = array(
'feedid' => $cat_item['fi'], 'feedid' => $cat_item['fi'],
'catid' => $cat_item['id'], 'catid' => $cat_item['id'],
......
...@@ -56,7 +56,7 @@ if (!$error) { ...@@ -56,7 +56,7 @@ if (!$error) {
<?php else: ?> <?php else: ?>
<section class="b-content__work"> <section class="b-content__work">
<div class="wrapp" style="position: relative;"> <div class="wrapp" style="position: relative; margin-bottom: 10px;">
<div class="b-feeds-stat_controls form-group"> <div class="b-feeds-stat_controls form-group">
<?php /* Переключатель страниц */ ?> <?php /* Переключатель страниц */ ?>
...@@ -148,10 +148,6 @@ if (!$error) { ...@@ -148,10 +148,6 @@ if (!$error) {
<a class="btn btn-primary submit-action" href="#" action="<?= $form_link ?>" method="post"><?= _t('Сохранить') ?></a> <a class="btn btn-primary submit-action" href="#" action="<?= $form_link ?>" method="post"><?= _t('Сохранить') ?></a>
<a class="btn btn-default cancel-action" href="<?= $link_cancel ?>"><?= _t('Отмена')?></a> <a class="btn btn-default cancel-action" href="<?= $link_cancel ?>"><?= _t('Отмена')?></a>
</div> </div>
</div> </div>
</section> </section>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment