Skip to content

tp TouchPointWP CalendarGrid

James K. edited this page Oct 10, 2024 · 3 revisions

tp\TouchPointWP\CalendarGrid

Creates a listing of events, typically arranged in a monthly grid, but transformable to a list.

  • Class name: CalendarGrid
  • Namespace: \tp\TouchPointWP

Properties

next

public mixed next = null
  • Visibility: public

prev

public mixed prev = null
  • Visibility: public

html

public  html

The HTML for the calendar grid.

  • Visibility: public

monthName

public  monthName

The name of the month being displayed.

  • Visibility: public

eventCount

public  eventCount

The number of events included in the grid. Used for the "no events" logic.

  • Visibility: public

Methods

__construct

void tp\TouchPointWP\CalendarGrid::__construct(\WP_Query q, int|null month, int|null year)

Create a calendar grid for a given month and year.

  • Visibility: public

Arguments

  • q WP_Query* month int|null* year int|null

__toString

string tp\TouchPointWP\CalendarGrid::__toString()

Render the grid as HTML.

  • Visibility: public

Returns

  • string -

enqueueCalendarStyle

mixed tp\TouchPointWP\CalendarGrid::enqueueCalendarStyle()

This function enqueues the stylesheet for the calendar grid.

  • Visibility: public
  • This method is static.

Returns

  • mixed

navBar

string tp\TouchPointWP\CalendarGrid::navBar(bool withMonthName, string class)

This method returns a navigation bar for the calendar grid with simply next/prev month links.

  • Visibility: public

Arguments

  • withMonthName bool* class string

Returns

  • string -

getNextLink

string tp\TouchPointWP\CalendarGrid::getNextLink()

Get HTML for a link to the next month.

  • Visibility: public

Returns

  • string -

getPrevLink

string tp\TouchPointWP\CalendarGrid::getPrevLink()

Get HTML for a link to the previous month.

  • Visibility: public

Returns

  • string -
Clone this wiki locally