silverstripe-framework/admin/code/CMSPreviewable.php

30 lines
885 B
PHP
Raw Normal View History

<?php
/**
* Interface to provide enough information about a record to make it previewable
2013-10-15 00:26:23 +02:00
* through the CMS. It uses the record database ID, its "frontend" and "backend"
* links to link up the edit form with its preview.
2014-08-15 08:53:05 +02:00
*
2013-10-15 00:26:23 +02:00
* Also used by {@link SilverStripeNavigator} to generate links - both within
* the CMS preview, and as a frontend utility for logged-in CMS authors in
* custom themes (with the $SilverStripeNavigator template marker).
*
* @package framework
* @subpackage admin
*/
interface CMSPreviewable {
2014-08-15 08:53:05 +02:00
/**
* @return String Absolute URL to the end-user view for this record.
* Example: http://mysite.com/my-record
*/
public function Link();
2014-08-15 08:53:05 +02:00
/**
2013-10-15 00:26:23 +02:00
* @return String Absolute URL to the CMS-author view. Should point to a
* controller subclassing {@link LeftAndMain}. Example:
* http://mysite.com/admin/edit/6
*/
public function CMSEditLink();
}