CRM_Core_CommunityMessages
class CRM_Core_CommunityMessages
Manage the download, validation, and rendering of community messages
Constants
DEFAULT_MESSAGES_URL |
|
DEFAULT_PERMISSION |
|
DEFAULT_RETRY |
Default time to wait before retrying. |
Properties
protected CRM_Utils_HttpClient | $client | ||
protected CRM_Utils_Cache_Interface | $cache | ||
protected FALSE|string | $messagesUrl |
Methods
static CRM_Core_CommunityMessages
create()
Create default instance.
__construct(CRM_Utils_Cache_Interface $cache, CRM_Utils_HttpClient $client, null $messagesUrl = NULL)
No description
NULL|array
getDocument()
Get the messages document (either from the cache or by downloading)
NULL|array
fetchDocument()
Download document from URL and parse as JSON.
FALSE|string
getRenderedUrl()
Get the final, usable URL string (after interpolating any variables)
bool
isEnabled()
No description
NULL|array
pick()
Pick a message to display.
static string
evalMarkup(string $markup)
No description
bool
validateDocument(array $document)
Ensure that a document is well-formed
Details
at line 61
static CRM_Core_CommunityMessages
create()
Create default instance.
at line 73
__construct(CRM_Utils_Cache_Interface $cache, CRM_Utils_HttpClient $client, null $messagesUrl = NULL)
at line 92
NULL|array
getDocument()
Get the messages document (either from the cache or by downloading)
at line 132
NULL|array
fetchDocument()
Download document from URL and parse as JSON.
at line 149
FALSE|string
getRenderedUrl()
Get the final, usable URL string (after interpolating any variables)
at line 156
bool
isEnabled()
at line 165
NULL|array
pick()
Pick a message to display.
at line 197
static string
evalMarkup(string $markup)
at line 223
bool
validateDocument(array $document)
Ensure that a document is well-formed