\System\EventSystemShortcode

Main Shortcode Listener for System plugin.

Summary

Methods
Properties
Constants
implementedEvents()
shortcodeRandom()
shortcodeTranslate()
shortcodeUrl()
shortcodeDate()
shortcodeLocale()
noShortcode()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

implementedEvents()

implementedEvents() : void

Returns a list of events this Event Listener is implementing. When the class is registered in an event manager, each individual method will be associated with the respective event.

shortcodeRandom()

shortcodeRandom(\Cake\Event\Event $event, array $atts, string $content, string $tag) : string

Implements the "random" shortcode.

{random}1,2,3{/random}

Parameters

\Cake\Event\Event $event

The event that was fired

array $atts

An associative array of attributes, or an empty string if no attributes are given

string $content

The enclosed content (if the shortcode is used in its enclosing form)

string $tag

The shortcode tag

Returns

string

shortcodeTranslate()

shortcodeTranslate(\Cake\Event\Event $event, array $atts, string $content, string $tag) : string

Implements the "t" shortcode.

{t}Text for translate{/t}

Parameters

\Cake\Event\Event $event

The event that was fired

array $atts

An associative array of attributes, or an empty string if no attributes are given

string $content

The enclosed content (if the shortcode is used in its enclosing form)

string $tag

The shortcode tag

Returns

string

shortcodeUrl()

shortcodeUrl(\Cake\Event\Event $event, array $atts, string $content, string $tag) : string

Implements the "url" shortcode.

{url}/some/url/on/my/site{/url}

Parameters

\Cake\Event\Event $event

The event that was fired

array $atts

An associative array of attributes, or an empty string if no attributes are given

string $content

The enclosed content (if the shortcode is used in its enclosing form)

string $tag

The shortcode tag

Returns

string

shortcodeDate()

shortcodeDate(\Cake\Event\Event $event, array $atts, string $content, string $tag) : string

Implements the "date" shortcode.

{date format=d-m-Y}2014-05-06{/date}

Parameters

\Cake\Event\Event $event

The event that was fired

array $atts

An associative array of attributes, or an empty string if no attributes are given

string $content

The enclosed content (if the shortcode is used in its enclosing form)

string $tag

The shortcode tag

Returns

string

shortcodeLocale()

shortcodeLocale(\Cake\Event\Event $event, array $atts, string $content, string $tag) : string

Implements the "locale" shortcode.

{locale code /} {locale name /} {locale direction /}

Parameters

\Cake\Event\Event $event

The event that was fired

array $atts

An associative array of attributes, or an empty string if no attributes are given

string $content

The enclosed content (if the shortcode is used in its enclosing form)

string $tag

The shortcode tag

Returns

string

noShortcode()

noShortcode(\Cake\Event\Event $event, array $atts, string $content, string $tag) : string

Used to remove shortcodes. Any shortcode within this shortcode's content will not be converted.

Usage:

{no_shortcode}
    This shortcode will not work {some_shortcode /}
{/no_shortcode}

Parameters

\Cake\Event\Event $event

The event that was fired

array $atts

An associative array of attributes, or an empty string if no attributes are given

string $content

The enclosed content (if the shortcode is used in its enclosing form)

string $tag

The shortcode tag

Returns

string