LeKoala\Mandrill\MandrillAdmin
Mandrill admin section
Allow you to see messages sent through the api key used to send messages
- Author: LeKoala <thomas@lekoala.be>
Synopsis
class MandrillAdmin
extends LeftAndMain
implements
PermissionProvider
{
- // constants
- const MESSAGE_CACHE_MINUTES = 5;
- const WEBHOOK_CACHE_MINUTES = 1440;
- const SENDINGDOMAIN_CACHE_MINUTES = 1440;
- // members
- private static string $menu_title = "Mandrill";
- private static string $url_segment = "mandrill";
- private static string $menu_icon = "lekoala/silverstripe-mandrill:images/icon.png";
- private static string $url_rule = '/$Action/$ID/$OtherID';
- private static array $allowed_actions = ;
- private static boolean $cache_enabled = true;
- protected Exception $lastException;
- private static array $dependencies = ;
- public LoggerInterface $logger;
- public CacheInterface $cache;
- // methods
- public void init()
- public void index()
- public void settings()
- public void send_test()
- public Session getSession()
- public Form getEditForm()
- public LoggerInterface getLogger()
- public CacheInterface getCache()
- public boolean getCacheEnabled()
- protected array getCachedData()
- public void getParams()
- public void getParam()
- public void SearchFields()
- public void SearchForm()
- public void doSearch()
- public ArrayList|string Messages()
- public array providePermissions()
- protected string MessageHelper()
- protected string ButtonHelper()
- public bool IsAdmin()
- public bool canView()
- public bool CanConfigureApi()
- public bool|array WebhookInstalled()
- public ArrayData|null WebhookDetails()
- public FormField WebhookTab()
- public string WebhookUrl()
- public FormField InstallHookForm()
- public HTTPResponse doInstallHook()
- public FormField UninstallHookForm()
- public HTTPResponse doUninstallHook()
- public array|bool SendingDomainInstalled()
- public array|bool VerifySendingDomain()
- public FormField DomainTab()
- public string InboundUrl()
- public boolean|string getDomain()
- public void InstallDomainForm()
- public HTTPResponse doInstallDomain()
- public void UninstallDomainForm()
Hierarchy
Extends
- SilverStripe\Admin\LeftAndMain
Implements
- SilverStripe\Security\PermissionProvider
Tasks
Line | Task |
---|---|
749 | - Use $client or remove? |
Constants
Name | Value |
---|---|
MESSAGE_CACHE_MINUTES | 5 |
WEBHOOK_CACHE_MINUTES | 1440 |
SENDINGDOMAIN_CACHE_MINUTES | 1440 |
Members
private
- $allowed_actions
- $cache_enabled
- $dependencies
—
array
Inject public dependencies into the controller - $url_rule
- $url_segment
protected
- $lastException — Exception
public
- $cache — Psr\SimpleCache\CacheInterface
- $logger — Psr\Log\LoggerInterface
Methods
protected
- ButtonHelper() — Button helper
- MessageHelper() — Message helper
- getCachedData() — A simple cache helper
public
- CanConfigureApi()
- DomainTab() — Get content of the tab
- InboundUrl()
- InstallDomainForm() — Install domain form
- InstallHookForm() — Install hook form
- IsAdmin() — A template accessor to check the ADMIN permission
- Messages() — List of messages events
- SearchFields()
- SearchForm()
- SendingDomainInstalled() — Check if sending domain is installed
- UninstallDomainForm() — Uninstall domain form
- UninstallHookForm() — Uninstall hook form
- VerifySendingDomain() — Trigger request to check if sending domain is verified
- WebhookDetails() — Hook details for template
- WebhookInstalled() — Check if webhook is installed. Returns the webhook details if installed.
- WebhookTab() — Get content of the tab
- WebhookUrl()
- canView() — Check the permission for current user
- doInstallDomain()
- doInstallHook()
- doSearch()
- doUninstallHook()
- getCache() — Get the cache
- getCacheEnabled()
- getDomain() — Get domain
- getEditForm() — Returns a GridField of messages
- getLogger() — Get logger
- getParam()
- getParams()
- getSession()
- index()
- init()
- providePermissions() — Provides custom permissions to the Security section
- send_test()
- settings()