Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WP Mail
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
Library
WP Mail
Merge requests
!2
Devel
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Devel
devel
into
main
Overview
44
Commits
35
Pipelines
34
Changes
5
Merged
Piotr Potrebka
requested to merge
devel
into
main
2 years ago
Overview
44
Commits
35
Pipelines
34
Changes
5
0
0
Merge request reports
Viewing commit
de65272a
Prev
Next
Show latest version
5 files
+
104
−
103
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
de65272a
feat: email abstract
· de65272a
Piotr Potrebka
authored
2 years ago
src/Abstracts/EmailAbstract.php
+
9
−
29
View file @ de65272a
Edit in single-file editor
Open in Web IDE
Show full file
@@ -2,55 +2,44 @@
namespace
WPDesk\Library\WPEmail\Abstracts
;
use
WPDesk\View\Renderer\Renderer
;
abstract
class
EmailAbstract
implements
EmailGettersInterface
{
abstract
class
EmailAbstract
implements
EmailInterface
{
/**
* @var array
*/
pr
ivate
$recipients
=
[];
pr
otected
$recipients
=
[];
/**
* @var array
*/
pr
ivate
$placeholders
=
[];
pr
otected
$placeholders
=
[];
/**
* @var string
*/
pr
ivate
$subject
=
''
;
pr
otected
$subject
=
''
;
/**
* @var string
*/
pr
ivate
$heading
=
''
;
pr
otected
$heading
=
''
;
/**
* @var array
*/
pr
ivate
$attachments
=
[];
pr
otected
$attachments
=
[];
/**
* @var string
*/
pr
ivate
$content
=
''
;
pr
otected
$content
=
''
;
/**
* @var string
*/
pr
ivate
$type
=
'text/html'
;
pr
otected
$type
=
'text/html'
;
/**
* @var array
*/
private
$headers
;
/**
* @var Renderer
*/
private
$renderer
;
public
function
__construct
(
Renderer
$renderer
)
{
$this
->
renderer
=
$renderer
;
}
protected
$headers
;
/**
* Define unique email ID.
@@ -147,13 +136,4 @@ abstract class EmailAbstract implements EmailGettersInterface {
return
''
;
}
/**
* Get email content.
*
* @return string
*/
public
function
render
():
string
{
return
$this
->
renderer
->
render
(
dirname
(
__DIR__
)
.
'/html/default.php'
,
[
'content'
=>
$this
->
get_content
(),
'heading'
=>
$this
->
get_heading
(),
'object'
=>
$this
->
get_object
()
]
);
}
}
Loading