SilverStripe\CampaignAdmin\CampaignAdmin
Campaign section of the CMS
Synopsis
class CampaignAdmin
extends LeftAndMain
implements
PermissionProvider
{
- // members
- private static array $allowed_actions = ;
- private static integer $menu_priority = 3;
- private static integer $sync_expires = 300;
- private static string $menu_title = 'Campaigns';
- private static string $menu_icon_class = 'font-icon-page-multiple';
- private static $tree_class = ChangeSet::class;
- private static bool $show_published = true;
- private static bool $show_inferred = false;
- private static array $url_handlers = ;
- private static string $url_segment = 'campaigns';
- private static integer $thumbnail_width = 64;
- private static integer $thumbnail_height = 64;
- private static string $required_permission_codes = 'CMS_ACCESS_CampaignAdmin';
- // methods
- public void getClientConfig()
- public void init()
- public void getEditForm()
- public void EditForm()
- public HTTPResponse readCampaigns()
- protected array getPlaceholderGroups()
- protected array getListResource()
- protected array getChangeSetResource()
- protected array getChangeSetItemResource()
- protected SS_List getListItems()
- public HTTPResponse readCampaign()
- public HTTPResponse removeCampaignItem()
- public HTTPResponse deleteCampaign()
- public HTTPResponse publishCampaign()
- public Form campaignEditForm()
- public Form getCampaignEditForm()
- public Form campaignCreateForm()
- public Form getCampaignCreateForm()
- public HTTPResponse save()
- public string SetLink()
- public string ItemLink()
- public void providePermissions()
- protected bool shouldCampaignSync()
Hierarchy
Extends
- SilverStripe\Admin\LeftAndMain
Implements
- SilverStripe\Security\PermissionProvider
Tasks
Line | Task |
---|---|
609+ | Use GridFieldDetailForm once it can handle structured data and form schemas |
609+ | move to FormBuilder |
690+ | Move to form builder |
Members
private
- $allowed_actions
- $required_permission_codes
- $show_inferred
—
SilverStripe\CampaignAdmin\bool
Show inferred changesets (automatically created when you publish a page) - $show_published
—
SilverStripe\CampaignAdmin\bool
Show published changesets - $sync_expires
—
int
When listing campaigns, re-sync items automatically after this many seconds. - $thumbnail_height
—
int
Size of thumbnail height - $thumbnail_width
—
int
Size of thumbnail width - $tree_class
- $url_handlers
- $url_segment
Methods
protected
- getChangeSetItemResource() — Build item resource from a changesetitem
- getChangeSetResource() — Build item resource from a changeset
- getListItems() — Gets viewable list of campaigns
- getListResource() — Get list contained as a hal wrapper
- getPlaceholderGroups()
- shouldCampaignSync() — Check if the given campaign should be synced before view
public
- EditForm()
- ItemLink() — Gets user-visible url to edit a specific {@see ChangeSetItem}
- SetLink() — Gets user-visible url to edit a specific {@see ChangeSet}
- campaignCreateForm() — Url handler for create form
- campaignEditForm() — Url handler for edit form
- deleteCampaign() — REST endpoint to delete a campaign.
- getCampaignCreateForm() — Build create form
- getCampaignEditForm()
- getClientConfig()
- getEditForm()
- init()
- providePermissions()
- publishCampaign() — REST endpoint to publish a {@link ChangeSet} and all of its items.
- readCampaign() — REST endpoint to get a campaign.
- readCampaigns() — REST endpoint to get a list of campaigns.
- removeCampaignItem() — REST endpoint to delete a campaign item.
- save() — Save handler