SilverCommerce\OrdersAdmin\Control\DisplayController
Controller responsible for displaying either an rendered order or a rendered quote that can be emailed or printed.
Synopsis
class DisplayController
extends Controller
{
- // members
- private static string $url_segment = "ordersadmin/display";
- private static array $allowed_actions = ;
- private static string $pdf_css = 'silvercommerce/orders-admin: client/dist/css/pdf.css';
- protected Estimate $object;
- // methods
- protected void init()
- protected Dompdf generate_pdf()
- public Image Logo()
- public string LogoBase64()
- public string Link()
- public string AbsoluteLink()
- protected string getPdfCss()
- public void invoice()
- public void invoicepdf()
- public void estimate()
- public void estimatepdf()
Hierarchy
Extends
- SilverStripe\Control\Controller
Tasks
Line | Task |
---|---|
218+ | At the moment this exits all execution after generating and streaming PDF. Ideally this should tap into |
Members
private
- $allowed_actions
- $pdf_css
—
string
directory for pdf css file (in requirements format) - $url_segment
—
string
ClassName of Order object
protected
- $object
—
SilverCommerce\OrdersAdmin\Model\Estimate
Ther object associated with this controller
Methods
protected
- generate_pdf() — Generate a Dompdf object from the provided html
- getPdfCss() — Generate the CSS for the rendered PDF as a string (based on the provided path in config)
- init()
public
- AbsoluteLink() — Get an absolute link to an order or invoice
- Link() — Get a relative link to anorder or invoice
- Logo() — Undocumented function
- LogoBase64() — get the current logo as a base 64 encoded string
- estimate()
- estimatepdf()
- invoice()
- invoicepdf() — Generate a PDF based on the invoice html output.