Skip to content

Quantum Toolkit#232

Closed
Arno2005 wants to merge 2 commits intosoftberg:Quantum-Toolkitfrom
Arno2005:Quantum-Toolkit
Closed

Quantum Toolkit#232
Arno2005 wants to merge 2 commits intosoftberg:Quantum-Toolkitfrom
Arno2005:Quantum-Toolkit

Conversation

@Arno2005
Copy link
Copy Markdown
Collaborator

Closes #173

@Arno2005 Arno2005 requested a review from armanist March 27, 2025 14:22
@armanist armanist added help wanted Extra attention is needed good first issue Good for newcomers new feature labels Apr 23, 2025
@armanist armanist added this to the 2.9.7 milestone Apr 23, 2025
Copy link
Copy Markdown
Member

@armanist armanist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to change to ModelFactory::createOrmInstance($tableName);


$row = $table->create();

foreach($data as $field => $value){
Copy link
Copy Markdown
Member

@armanist armanist Apr 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can leverage from fillObjectProps()

$table = Database::getInstance()->getOrm($tableName);

$row = $table->findOne($id);
foreach($data as $field => $value){
Copy link
Copy Markdown
Member

@armanist armanist Apr 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can leverage from fillObjectProps()

@@ -0,0 +1,12 @@
<ul class="bg-bubbles">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this file is required for toolkit?


namespace Modules\Toolkit\Services;

use Quantum\Exceptions\BaseException;
Copy link
Copy Markdown
Member

@armanist armanist Apr 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the use statement ordering


$row = $table->create();

foreach($data as $field => $value){
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use fillObjectProps() instead

$table = Database::getInstance()->getOrm($tableName);

$row = $table->findOne($id);
foreach($data as $field => $value){
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use fillObjectProps instead

@armanist armanist modified the milestones: 2.9.7, 2.9.8 May 20, 2025
@armanist
Copy link
Copy Markdown
Member

Closing this in advance of pull request #286

@armanist armanist closed this Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers help wanted Extra attention is needed new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants