CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (Github)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 5.1 Chiffon API

  • Project:
    • CakePHP
      • CakePHP
      • Authentication
      • Authorization
      • Chronos
      • Elastic Search
      • Queue
  • Version:
    • 5.1
      • 5.2
      • 5.1
      • 5.0
      • 4.6
      • 4.5
      • 4.4
      • 4.3
      • 4.2
      • 4.1
      • 4.0
      • 3.10
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Namespaces

  • Global
  • Cake
    • Cache
    • Collection
    • Command
    • Console
    • Controller
    • Core
    • Database
    • Datasource
    • Error
    • Event
    • Form
    • Http
    • I18n
    • Log
    • Mailer
      • Exception
      • Transport
    • Network
    • ORM
    • Routing
    • TestSuite
    • Utility
    • Validation
    • View

Class Renderer

Class for rendering email message.

Namespace: Cake\Mailer

Constants

  • string
    TEMPLATE_FOLDER ¶
    'email'

    Constant for folder name containing email templates.

Property Summary

  • $_viewBuilder protected
    Cake\View\ViewBuilder|null

    The view builder instance being used.

Method Summary

  • __clone() public

    Clone ViewBuilder instance when renderer is cloned.

  • __construct() public

    Constructor

  • createView() public

    Constructs the view class instance based on the current configuration.

  • render() public

    Render text/HTML content.

  • reset() public

    Reset view builder to defaults.

  • set() public

    Saves a variable or an associative array of variables for use inside a template.

  • viewBuilder() public

    Get the view builder being used.

Method Detail

__clone() ¶ public

__clone(): void

Clone ViewBuilder instance when renderer is cloned.

Returns
void

__construct() ¶ public

__construct()

Constructor

createView() ¶ public

createView(string|null $viewClass = null): Cake\View\View

Constructs the view class instance based on the current configuration.

Parameters
string|null $viewClass optional

Optional namespaced class name of the View class to instantiate.

Returns
Cake\View\View
Throws
Cake\View\Exception\MissingViewException
If view class was not found.

render() ¶ public

render(string $content, array<string> $types = []): array<string, string>

Render text/HTML content.

If there is no template set, the $content will be returned in a hash of the specified content types for the email.

Parameters
string $content

The content.

array<string> $types optional

Content types to render. Valid array values are {@link Message::MESSAGE_HTML}, {@link Message::MESSAGE_TEXT}.

Returns
array<string, string>

reset() ¶ public

reset(): $this

Reset view builder to defaults.

Returns
$this

set() ¶ public

set(array|string $name, mixed $value = null): $this

Saves a variable or an associative array of variables for use inside a template.

Parameters
array|string $name

A string or an array of data.

mixed $value optional

Value in case $name is a string (which then works as the key). Unused if $name is an associative array, otherwise serves as the values to $name's keys.

Returns
$this

viewBuilder() ¶ public

viewBuilder(): Cake\View\ViewBuilder

Get the view builder being used.

Returns
Cake\View\ViewBuilder

Property Detail

$_viewBuilder ¶ protected

The view builder instance being used.

Type
Cake\View\ViewBuilder|null
OpenHub
Pingping
Linode
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (Github)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs