PHP code example of webbuilders-group / silverstripe-add-to-campaigns
1. Go to this page and download the library: Download webbuilders-group/silverstripe-add-to-campaigns library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
webbuilders-group / silverstripe-add-to-campaigns example snippets
use SilverStripe\CampaignAdmin\AddToCampaignHandler_FormAction;
/** ... **/
if (($myDataObject->isPublished() || $myDataObject->isOnDraft()) && $myDataObject->canPublish()) {
$moreOptions->push(
AddToCampaignHandler_FormAction::create()
->removeExtraClass('btn-primary')
->addExtraClass('btn-secondary')
);
}