Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
pull_request:
branches:
- '*'
workflow_dispatch:

permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy_docs_4x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- 4.x
workflow_dispatch:

jobs:
deploy:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cakephp/debug_kit",
"description": "CakePHP Debug Kit",
"type": "cakephp-plugin",
"keywords": ["cakephp", "debug", "kit"],
"keywords": ["cakephp", "debug", "kit", "dev"],
"homepage": "https://github.com/cakephp/debug_kit",
"license": "MIT",
"authors": [
Expand Down
16 changes: 9 additions & 7 deletions templates/MailPreview/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ class UserMailer extends Mailer
{
public function welcome($user)
{
return $this // Returning the chain is a good idea :)
->to($user->email)
->subject(sprintf("Welcome %s", $user->name))
->template("welcome_mail") // By default template with same name as method name is used.
->layout("custom")
->set(["user" => $user]);
$mailer = $this->setTo($user->email)
->setSubject(sprintf("Welcome %s", $user->name))
->setViewVars(["user" => $user]);
$mailer->viewBuilder()
->setTemplate("welcome_mail") // By default template with same name as method name is used.
->setLayout("custom");
return $mailer;
}
}';
highlight_string($code);
Expand All @@ -75,9 +76,10 @@ public function welcome()
{
$this->loadModel("Users");
$user = $this->Users->find()->first();

return $this->getMailer("User")
->welcome($user)
->set(["activationToken" => "dummy-token"]);
->setViewVars(["activationToken" => "dummy-token"]);
}
}';
highlight_string($code);
Expand Down