Skip to content

Instantly share code, notes, and snippets.

@Greg808
Created March 29, 2018 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Greg808/f7713934bb63120d54046e6289d00e35 to your computer and use it in GitHub Desktop.
Save Greg808/f7713934bb63120d54046e6289d00e35 to your computer and use it in GitHub Desktop.
namespace R12proofshop\Model;
use R12proofshop\Controller\ProofshopPageController;
use SilverStripe\Security\Permission;
class ProofshopPage extends \Page
{
private static $table_name = 'ProofshopPage';
private static $db = [];
public function canCreate($member = null, $context = [])
{
return true;
}
public function canView($member = null)
{
return true;
}
public function canPublish($member = null)
{
return true;
}
public function canEdit($member = null)
{
return true;
}
public function canDelete($member = null)
{
return Permission::check('ADMIN');
}
public function getControllerName()
{
return ProofshopPageController::class;
}
}
namespace R12proofshop\Controller;
class ProofshopPageController extends \PageController
{
private static $pdfInfoPath = "";
private static $allowed_actions = [
'FileUploadFormProof',
'handleFileUpload',
'OrderDetailsForm',
'handleOrderDetails',
'kosten',
'checkout',
'CheckoutFormProofshop',
'handleZahlung',
'success',
'doLogin',
'error'
];
public function init()
{
parent::init();
}
public function index()
{
return [];
}
public function Link($action = '')
{
return Controller::join_links('shop/web2proof', $action);
}
}
@Greg808
Copy link
Author

Greg808 commented Mar 29, 2018

I think this is the relevant part of the controller code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment