Neuron-PHP

CalendarWidget
in package
implements IWidget

Calendar widget for displaying events via shortcode.

Usage: [calendar category="slug" limit="5" upcoming="true"]

Table of Contents

Interfaces

IWidget
Widget interface for extensible shortcode/widget system.

Properties

$_categoryRepository  : DatabaseEventCategoryRepository
$_eventRepository  : DatabaseEventRepository

Methods

__construct()  : mixed
getAttributes()  : array<string, string>
Get supported attributes
getDescription()  : string
Get widget description
getName()  : string
Get widget shortcode name
render()  : string
Render the calendar widget
renderTemplate()  : string
Render widget template

Properties

Methods

getAttributes()

Get supported attributes

public getAttributes() : array<string, string>
Return values
array<string, string>

getDescription()

Get widget description

public getDescription() : string
Return values
string

Widget description

getName()

Get widget shortcode name

public getName() : string
Return values
string

Shortcode name (e.g., 'property-listings')

render()

Render the calendar widget

public render(array<string, mixed> $attrs) : string
Parameters
$attrs : array<string, mixed>

Shortcode attributes

Return values
string

Rendered HTML

renderTemplate()

Render widget template

private renderTemplate(array<int, Event$events, array<string, mixed> $attrs) : string
Parameters
$events : array<int, Event>
$attrs : array<string, mixed>
Return values
string

        
On this page

Search results