-
Backend
-
Behaviors
-
Classes
-
Controllers
-
Database
-
Seeds
-
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Skins
-
Traits
-
VueComponents
-
Widgets
- ServiceProvider
-
-
Cms
-
Classes
- Asset
- CmsCompoundObject
- CmsController
- CmsException
- CmsObject
- CmsObjectCollection
- CodeBase
- CodeParser
- ComponentBase
- ComponentHelpers
- ComponentManager
- ComponentPartial
- Content
- Controller
- EditorExtension
- Layout
- LayoutCode
- MediaLibrary
- MediaLibraryItem
- MediaViewHelper
- Meta
- ObjectMemoryCache
- Page
- PageCode
- Partial
- PartialCode
- PartialStack
- Router
- Theme
- ThemeManager
-
Components
-
Controllers
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ComponentNode
- ComponentTokenParser
- ContentNode
- ContentTokenParser
- DebugExtension
- DefaultNode
- DefaultTokenParser
- Extension
- FlashNode
- FlashTokenParser
- FrameworkNode
- FrameworkTokenParser
- Loader
- PageNode
- PageTokenParser
- PartialNode
- PartialTokenParser
- PlaceholderNode
- PlaceholderTokenParser
- PutNode
- PutTokenParser
- ScriptsNode
- ScriptsTokenParser
- StylesNode
- StylesTokenParser
-
VueComponents
-
Widgets
- ServiceProvider
-
-
Editor
-
Behaviors
-
Classes
-
Controllers
-
VueComponents
- ServiceProvider
-
-
Media
-
Classes
-
Controllers
-
FormWidgets
-
Twig
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
Console
-
OctoberUtil
- ComposerScript
- OctoberDown
- OctoberFresh
- OctoberMigrate
- OctoberMirror
- OctoberPasswd
- OctoberUp
- OctoberUpdate
- OctoberUtil
- PluginCheck
- PluginDisable
- PluginEnable
- PluginInstall
- PluginList
- PluginRefresh
- PluginRemove
- ProjectSet
- ProjectSync
- ThemeCheck
- ThemeInstall
- ThemeList
- ThemeRemove
- ThemeSync
- ThemeUse
-
-
Controllers
-
Database
-
Facades
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
-
Widgets
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
filter
-
form
-
list
-
menu
-
page
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
object
-
page
-
resizer
-
router
-
template
-
theme
-
-
exception
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
auth
-
form
-
relation
-
/docs/api/model/relation/add
-
/docs/api/model/relation/associate
- attach
-
/docs/api/model/relation/beforeadd
-
/docs/api/model/relation/beforeassociate
- beforeAttach
- beforeDetach
-
/docs/api/model/relation/beforedissociate
-
/docs/api/model/relation/beforeremove
- detach
-
/docs/api/model/relation/dissociate
-
/docs/api/model/relation/remove
-
- afterBoot
- afterCreate
- afterDelete
- afterFetch
- afterRestore
- afterSave
- afterUpdate
- afterValidate
- beforeCreate
- beforeDelete
- beforeFetch
- beforeGetAttribute
- beforeRestore
- beforeSave
- beforeSetAttribute
- beforeUpdate
- beforeValidate
- getAttribute
- saveInternal
- setAttribute
-
-
system
-
assets
-
console
-
mirror
-
theme
-
-
reportwidgets
-
resizer
-
settings
- extendConfigFile
-
-
translator
-
-
Library
-
Argon
-
Assetic
-
Asset
-
Cache
-
Exception
-
Factory
-
Filter
- BaseCssFilter
- CallablesFilter
- CssCacheBustingFilter
- CssImportFilter
- CssMinFilter
- CssRewriteFilter
- FilterCollection
- JavascriptImporter
- JSMinFilter
- JSMinPlusFilter
- JSqueezeFilter
- LessCompiler
- LessphpFilter
- MinifyCssCompressorFilter
- PackagerFilter
- PackerFilter
- ScssCompiler
- ScssphpFilter
- StylesheetMinify
-
Util
- README
- AssetManager
- AssetWriter
- FilterManager
-
-
Auth
-
Models
- AuthException
- Manager
-
-
Config
-
Database
-
Attach
-
Behaviors
-
Concerns
-
Connections
-
Connectors
-
Models
-
Relations
-
Schema
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- DataFeed
- Dongle
- MemoryCache
- MigrationServiceProvider
- Model
- ModelBehavior
- ModelException
- MorphPivot
- NestedTreeScope
- Pivot
- QueryBuilder
- SortableScope
- TreeCollection
- Updater
-
-
Events
-
Exception
-
Extension
-
Filesystem
-
Flash
-
Foundation
-
Bootstrap
-
Console
-
Exception
-
Http
-
Middleware
- Kernel
-
-
Providers
- Application
- Maker
-
-
Halcyon
-
Datasource
-
Exception
-
Processors
-
Traits
- README
- Builder
- Collection
- HalcyonServiceProvider
- MemoryCacheManager
- MemoryRepository
- Model
-
-
Html
-
Mail
-
Network
-
Parse
-
Parsedown
-
Syntax
- Bracket
- Ini
- Markdown
- MarkdownData
- ParseServiceProvider
- Twig
- Yaml
-
-
Process
-
Resize
-
Router
-
Scaffold
-
Support
-
Translation
-
- Documentation
- API
- System
- Classes
- MailManager
System\Classes\MailManager
MailManager manages Mail sending functions
Protected properties
protected array $callbacks
Cache of registration callbacks.
protected array $templateCache
A cache of customised mail templates.
protected array $registeredTemplates
List of registered templates in the system
protected array $registeredPartials
List of registered partials in the system
protected array $registeredLayouts
List of registered layouts in the system
protected bool $isHtmlRenderMode
Internal marker for rendering mode
protected static $instance
Public methods
public void __clone()
public void __wakeup()
public void addContentFromEvent($message, $view=NULL, $plain=NULL, $raw=NULL, $data=array())
addContentFromEvent handles adding content from the [mailer.beforeAddContent](/docs/api/mailer/beforeaddcontent)
event
Parameters
- $message
- $view
- $plain
- $raw
- $data
public bool addContentToMailer(Illuminate\Mail\Message $message, string $code, array $data, bool $plainOnly=false)
addContentToMailer function hijacks the addContent
method of the
[October\Rain\Mail\Mailer](/docs/api/october/rain/mail/mailer)
class, using the [mailer.beforeAddContent](/docs/api/mailer/beforeaddcontent)
event.
Parameters
- Illuminate\Mail\Message $message
- string $code
- array $data
- bool $plainOnly - Add only plain text content to the message
public bool addRawContentToMailer($message, $content, $data)
addRawContentToMailer is the same as addContentToMailer
except with raw content
Parameters
- $message
- $content
- $data
public static void forgetInstance()
Forget this singleton's instance if it exists
public static void instance()
Create a new instance of this singleton.
public array listRegisteredLayouts()
Returns a list of the registered layouts.
public array listRegisteredPartials()
Returns a list of the registered partials.
public array listRegisteredTemplates()
Returns a list of the registered templates.
public void loadRegisteredTemplates()
Loads registered mail templates from modules and plugins
public void registerCallback(callable $callback)
Registers a callback function that defines mail templates. The callback function should register templates by calling the manager's registerMailTemplates() function. Thi instance is passed to the callback function as an argument. Usage:
MailManager::registerCallback(function ($manager) { $manager->registerMailTemplates([...]); });
Parameters
- callable $callback - A callable function.
public void registerMailLayouts($definitions)
Registers mail views and manageable layouts.
Parameters
- $definitions
public void registerMailPartials($definitions)
Registers mail views and manageable layouts.
Parameters
- $definitions
public void registerMailTemplates($definitions)
Registers mail views and manageable templates.
Parameters
- $definitions
public string render(string $content, array $data=array())
render the Markdown template into HTML
Parameters
- string $content
- array $data
public void renderPartial($code, $params=array())
renderPartial
Parameters
- $code
- $params
public void renderTemplate($template, $data=array())
renderTemplate
Parameters
- $template
- $data
public string renderText($content $content, array $data=array())
Render the Markdown template into text.
Parameters
- $content $content
- array $data
public void renderTextTemplate($template, $data=array())
renderTextTemplate
Parameters
- $template
- $data
Protected methods
protected void __construct()
Constructor.
protected void addContentToMailerInternal(Illuminate\Mail\Message $message, string $template, array $data, bool $plainOnly=false)
addContentToMailerInternal is an internal method used to share logic
between addRawContentToMailer
and addContentToMailer
Parameters
- Illuminate\Mail\Message $message
- string $template
- array $data
- bool $plainOnly - Add only plain text content to the message
protected void init()
Initialize the singleton free from constructor parameters.
protected void parseTwig($contents, $vars=array())
parseTwig parses Twig using the mailer environment
Parameters
- $contents
- $vars