BluehouseGroup\Pardot\PardotShortCode
Class for parsing shortcode for pardot forms and dynamic content.
PardotForm() and PardotDynamicContent() are the two endpoints for
the pardot shortcode api.
The Class is designed so that the cache does not need to be reset by a user.
The API is called when the the cache is empty, or if the content in the cache
doesn't match the requested content name or title, effectively resetting the cache.
shortcode endpoints configured in _config.php
Synopsis
class PardotShortCode
extends SiteTree
{
- // members
- private static array $casting = ;
- // methods
- public static string PardotForm()
- public static string PardotDynamicContent()
- public static string getFormEmbedCodeFromCache()
- public static string getDynamicContentEmbedCodeFromCache()
- public static array getFormsFromCache()
- public static array getDynamicContentFromCache()
- public static array cacheFormsFromPardotApi()
- public static array cacheDynamicContentFromPardotApi()
- private static void checkNameOrTitleEqual()
- public static void addAttributes()
Hierarchy
Extends
- SilverStripe\CMS\Model\SiteTree
Members
private
- $casting
Methods
private
- checkNameOrTitleEqual() — checks equivalence of two strings white space and capitalization doesnt matter
public
- PardotDynamicContent() — call back for pardot dynamic content
- PardotForm() — call back for pardot form shortcode.
- addAttributes() — add the other attributes included to the embed code supports type = 'Form' or 'DynamicContent' also forces https if selected in config
- cacheDynamicContentFromPardotApi() — caches pardot dynamic content from the pardot api.
- cacheFormsFromPardotApi() — caches pardot forms from the pardot api.
- getDynamicContentEmbedCodeFromCache() — Gets html to embed the pardot dynamic content based on name of content.
- getDynamicContentFromCache() — Gets array of dynamic content objects If forms are not available in the cache, then make them available
- getFormEmbedCodeFromCache() — Gets html to embed the pardot form based on name of the form.
- getFormsFromCache() — Gets array of form objects If forms are not available in the cache, then make them available