Skip to content

Update for Atk 4.0#10

Open
abbadon1334 wants to merge 41 commits into
developfrom
update/4.0
Open

Update for Atk 4.0#10
abbadon1334 wants to merge 41 commits into
developfrom
update/4.0

Conversation

@abbadon1334

@abbadon1334 abbadon1334 commented Feb 26, 2023

Copy link
Copy Markdown
Collaborator
  • Update to Atk4/Ui 4.0
  • Add demo managing pages
    • Grid MailResponses
    • Grid MailTemplates
    • Add/Edit MailTemplate
    • Send New Mail
    • Send New Mail using Template
  • Strengthen ContainsOne/Many relations

Runtime:       PHP 8.1.2
1) Atk4\Outbox\Tests\OutboxTest::testSend
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)
2) Atk4\Outbox\Tests\OutboxTest::testSendCallable
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)

Test leakage

Runtime:       PHP 8.1.2
1) Atk4\Outbox\Tests\OutboxTest::testSend
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)
2) Atk4\Outbox\Tests\OutboxTest::testSendCallable
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)

Test leakage

Runtime:       PHP 8.1.2
1) Atk4\Outbox\Tests\OutboxTest::testSend
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)
2) Atk4\Outbox\Tests\OutboxTest::testSendCallable
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)

Test leakage

Runtime:       PHP 8.1.2
1) Atk4\Outbox\Tests\OutboxTest::testSend
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)
2) Atk4\Outbox\Tests\OutboxTest::testSendCallable
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)

Test leakage

Runtime:       PHP 8.1.2
1) Atk4\Outbox\Tests\OutboxTest::testSend
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)
2) Atk4\Outbox\Tests\OutboxTest::testSendCallable
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)

Test leakage

Runtime:       PHP 8.1.2
1) Atk4\Outbox\Tests\OutboxTest::testSend
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)
2) Atk4\Outbox\Tests\OutboxTest::testSendCallable
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)

Test leakage

Runtime:       PHP 8.1.2
1) Atk4\Outbox\Tests\OutboxTest::testSend
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)
2) Atk4\Outbox\Tests\OutboxTest::testSendCallable
Memory leak detected! (68.781 + 68.750 + 68.750 KB, 4 iterations)
@abbadon1334 abbadon1334 marked this pull request as draft February 26, 2023 22:59
Comment thread demos/index.php
Comment on lines +176 to +205
$mlTokens = $column->addControl('_tokens', [Multiline::class], ['neverSave' => true, 'neverPersist' => true]);
$mlTokens->setModel($entityTemplate->ref('tokens'));

$column = $columns->addColumn(8);

/** @var Multiline $mlTo */
$mlTo = $column->addControl('_to', [Multiline::class], ['neverSave' => true, 'neverPersist' => true]);
$mlTo->addClass('fluid');
$mlTo->setModel($entityTemplate->ref('to'));

/** @var Multiline $mlCc */
$mlCc = $column->addControl('_cc', [Multiline::class], ['neverSave' => true, 'neverPersist' => true]);
$mlCc->setModel($entityTemplate->ref('cc'));

/** @var Multiline $mlBcc */
$mlBcc = $column->addControl('_bcc', [Multiline::class], ['neverSave' => true, 'neverPersist' => true]);
$mlBcc->setModel($entityTemplate->ref('bcc'));

/** @var Multiline $mlReplyTo */
$mlReplyTo = $column->addControl('_replyto', [Multiline::class], ['neverSave' => true, 'neverPersist' => true]);
$mlReplyTo->setModel($entityTemplate->ref('replyto'));

$form->onSubmit(function (\Atk4\Ui\Form $form) use ($mlTo, $mlTokens, $mlCc, $mlBcc, $mlReplyTo) {
$form->model->ref('from')->save([
'name' => $form->model->get('from_name'),
'email' => $form->model->get('from_email'),
]);

$mlTo->saveRows();
$mlTokens->saveRows();
$mlCc->saveRows();
$mlBcc->saveRows();
$mlReplyTo->saveRows();

$form->model->save();

return $this->loader->jsReload();
});

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Is this the correct way to manage ContainsOne/Many in Forms?

@abbadon1334 abbadon1334 marked this pull request as ready for review February 27, 2023 07:09
@abbadon1334

Copy link
Copy Markdown
Collaborator Author

Push forced to trigger deactivated GitActions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant