Conversation
armanist
left a comment
There was a problem hiding this comment.
The commit contains lots of other non related files and those should be removed from this commit. Also there are lots of functionality and references used from older version which already became outdated from version 2.9.6
| use Quantum\Libraries\Database\Contracts\PaginatorInterface; | ||
| use Quantum\Libraries\Database\Traits\PaginatorTrait; | ||
|
|
||
| class Paginator implements PaginatorInterface |
There was a problem hiding this comment.
This class need to be refined, since Paginator class had significant changes in last release
| $mailTrap = MailTrap::getInstance(); | ||
| $emailsDirectory = base_dir() . DS . 'shared' . DS . 'emails'; | ||
|
|
||
| $fs = FileSystemFactory::get(); |
There was a problem hiding this comment.
now we can leverage from fs() helper function instead of using factory class
| */ | ||
| public function getTable(string $tableName, int $perPage, int $currentPage): PaginatorInterface | ||
| { | ||
| $table = Database::getInstance()->getOrm($tableName); |
There was a problem hiding this comment.
Need to change to ModelFactory::createOrmInstance($tableName);
|
|
||
| $row = $table->create(); | ||
|
|
||
| foreach($data as $field => $value){ |
There was a problem hiding this comment.
We can leverage from fillObjectProps()
| $table = Database::getInstance()->getOrm($tableName); | ||
|
|
||
| $row = $table->findOne($id); | ||
| foreach($data as $field => $value){ |
There was a problem hiding this comment.
We can leverage from fillObjectProps()
| @@ -0,0 +1,12 @@ | |||
| <ul class="bg-bubbles"> | |||
There was a problem hiding this comment.
Why this file is required for toolkit?
|
|
||
| namespace Modules\Toolkit\Services; | ||
|
|
||
| use Quantum\Exceptions\BaseException; |
There was a problem hiding this comment.
Correct the use statement ordering
|
|
||
| $row = $table->create(); | ||
|
|
||
| foreach($data as $field => $value){ |
| $table = Database::getInstance()->getOrm($tableName); | ||
|
|
||
| $row = $table->findOne($id); | ||
| foreach($data as $field => $value){ |
|
Closing this in advance of pull request #286 |
Closes #173