Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for Atk 4.0 #10

Open
wants to merge 41 commits into
base: develop
Choose a base branch
from
Open

Update for Atk 4.0 #10

wants to merge 41 commits into from

Conversation

abbadon1334
Copy link
Collaborator

@abbadon1334 abbadon1334 commented Feb 26, 2023

  • 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 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
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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant