-
Notifications
You must be signed in to change notification settings - Fork 2
tp TouchPointWP Report
The Report class gets and processes a SQL or Python report from TouchPoint and presents it in the UX.
- Class name: Report
- Namespace: \tp\TouchPointWP
- This class implements: tp\TouchPointWP\api, tp\TouchPointWP\module, JsonSerializable, tp\TouchPointWP\updatesViaCron, tp\TouchPointWP\storedAsPost
const SHORTCODE_REPORT = \tp\TouchPointWP\TouchPointWP::SHORTCODE_PREFIX . "Report"
const POST_TYPE = \tp\TouchPointWP\TouchPointWP::HOOK_PREFIX . "report"
const META_PREFIX = \tp\TouchPointWP\TouchPointWP::SETTINGS_PREFIX . "rpt_"
const CRON_HOOK = \tp\TouchPointWP\TouchPointWP::HOOK_PREFIX . "report_cron_hook"
const TYPE_META_KEY = self::META_PREFIX . "type"
const NAME_META_KEY = self::META_PREFIX . "name"
const P1_META_KEY = self::META_PREFIX . "p1"
const DEFAULT_CONTENT = ''
public mixed classDefault = "TouchPoint-report"
- Visibility: public
public mixed _isLoaded = false
- Visibility: public
mixed tp\TouchPointWP\Report::fromParams(mixed params)
Get a Report object, based on standard parameters (generally, the parameters used for the shortcode)
- Visibility: public
- This method is static.
- params mixed
- mixed
bool tp\TouchPointWP\module::load()
Loads the module and initializes the other actions.
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\module
- bool -
mixed tp\TouchPointWP\Report::init()
Register stuff
- Visibility: public
- This method is static.
- mixed
bool tp\TouchPointWP\api::api(array uri)
Handle API requests
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\api
- uri array - The request URI already parsed by parse_url()
- bool - False if endpoint is not found. Should print the result.
string tp\TouchPointWP\Report::reportShortcode(mixed params, string content)
Handle the report shortcode.
- Visibility: public
- This method is static.
- params mixed* content string
- string -
\WP_Post|null tp\TouchPointWP\storedAsPost::getPost(bool create)
Get the WP_Post object corresponding to the object.
- Visibility: public
- This method is defined by tp\TouchPointWP\storedAsPost
- create bool - Set true if the post should be created if it doesn't exist. This would need to be implemented in each module, and is not implemented in most.
- \WP_Post|null -
string tp\TouchPointWP\Report::content(string contentIfError)
Get the report content. If no content is available, return the provided default content instead.
- Visibility: public
- contentIfError string
- string -
int tp\TouchPointWP\Report::updateFromTouchPoint(bool forceEvenIfNotDue)
Update all reports from TouchPoint that are due for an update.
- Visibility: public
- This method is static.
- forceEvenIfNotDue bool
- int -
bool tp\TouchPointWP\Report::needsUpdate()
Determines if THIS report is due for an update. Does NOT process the update itself.
- Visibility: public
- bool -
void tp\TouchPointWP\updatesViaCron::updateCron()
Run the updating cron task. Fail quietly to not disturb the visitor experience if using WP default cron handling.
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\updatesViaCron
array tp\TouchPointWP\Report::jsonSerialize()
Handle which data should be converted to JSON. Used for posting to the API.
- Visibility: public
- array - data which can be serialized by json_encode
void tp\TouchPointWP\updatesViaCron::checkUpdates()
Check to see if a cron run is needed, and run it if so. Connected to an init function.
- Visibility: public
- This method is static.
- This method is defined by tp\TouchPointWP\updatesViaCron
Documentation generated November 24, 2024 11:00pm.
- Simple RSVP
- People Lists
- Involvements
- Outreach Partners
- SQL & Python Reports
- Events Calendar from Meetings (Beta)
- Events Calendar Plugin Integration (Deprecated)
- tp
- tp\TouchPointWP
- api
- Auth
- CalendarGrid
- EventsCalendar
- ExtraValueHandler
- Geo
- hasGeo
- hierarchical
- Involvement
- Involvement_PostTypeSettings
- InvolvementMembership
- Location
- Meeting
- module
- Partner
- Person
- PostTypeCapable
- RegistrationType
- Report
- Rsvp
- scheduled
- Stats
- storedAsPost
- Taxonomies
- TouchPointWP
- TouchPointWP_AdminAPI
- TouchPointWP_Exception
- TouchPointWP_Settings
- TouchPointWP_Widget
- TouchPointWP_WPError
- updatesViaCron
- Utilities
- tp\TouchPointWP