Update Models\Group

This commit is contained in:
Visman 2021-12-02 22:18:40 +07:00
parent c3281b1146
commit f67cbc3a09
6 changed files with 27 additions and 14 deletions

View file

@ -11,7 +11,7 @@ declare(strict_types=1);
namespace ForkBB\Models\Group;
use ForkBB\Models\Action;
use ForkBB\Models\Group\Model as Group;
use ForkBB\Models\Group\Group;
class Delete extends Action
{

View file

@ -12,8 +12,14 @@ namespace ForkBB\Models\Group;
use ForkBB\Models\DataModel;
class Model extends DataModel
class Group extends DataModel
{
/**
* Ключ модели для контейнера
* @var string
*/
protected $cKey = 'Group';
/**
* Ссылка на страницу редактирования
*/

View file

@ -10,11 +10,17 @@ declare(strict_types=1);
namespace ForkBB\Models\Group;
use ForkBB\Models\ManagerModel;
use ForkBB\Models\Group\Model as Group;
use ForkBB\Models\Manager;
use ForkBB\Models\Group\Group;
class Manager extends ManagerModel
class Groups extends Manager
{
/**
* Ключ модели для контейнера
* @var string
*/
protected $cKey = 'Groups';
/**
* Флаг загрузки групп
* @var bool
@ -37,7 +43,7 @@ class Manager extends ManagerModel
/**
* Загрузка списка групп
*/
public function init(): Manager
public function init(): Groups
{
if (empty($this->flag)) {
$query = 'SELECT g.*

View file

@ -11,8 +11,8 @@ declare(strict_types=1);
namespace ForkBB\Models\Group;
use ForkBB\Models\Action;
use ForkBB\Models\Forum\Model as Forum;
use ForkBB\Models\Group\Model as Group;
use ForkBB\Models\Forum\Forum;
use ForkBB\Models\Group\Group;
use PDO;
use RuntimeException;

View file

@ -11,7 +11,7 @@ declare(strict_types=1);
namespace ForkBB\Models\Group;
use ForkBB\Models\Action;
use ForkBB\Models\Group\Model as Group;
use ForkBB\Models\Group\Group;
use RuntimeException;
class Save extends Action

View file

@ -234,6 +234,10 @@ return [
'Forums&save' => \ForkBB\Models\Forum\Save::class,
'Forums&updateUsername' => \ForkBB\Models\Forum\UpdateUsername::class,
'Group&delete' => \ForkBB\Models\Group\Delete::class,
'Group&perm' => \ForkBB\Models\Group\Perm::class,
'Group&save' => \ForkBB\Models\Group\Save::class,
'PBlockModel' => \ForkBB\Models\PM\PBlock::class,
'PMPTopicCalcStat' => \ForkBB\Models\PM\CalcStat::class,
'PMModelLoad' => \ForkBB\Models\PM\Load::class,
@ -377,11 +381,8 @@ return [
'ReportManagerSave' => \ForkBB\Models\Report\Save::class,
'ReportManagerLoad' => \ForkBB\Models\Report\Load::class,
'GroupModel' => \ForkBB\Models\Group\Model::class,
'GroupManager' => \ForkBB\Models\Group\Manager::class,
'GroupManagerSave' => \ForkBB\Models\Group\Save::class,
'GroupManagerDelete' => \ForkBB\Models\Group\Delete::class,
'GroupManagerPerm' => \ForkBB\Models\Group\Perm::class,
'GroupModel' => \ForkBB\Models\Group\Group::class,
'GroupManager' => \ForkBB\Models\Group\Groups::class,
'CategoriesManager' => \ForkBB\Models\Category\Categories::class,