-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH Use the new CMSEditLink extension on SiteTree #2778
ENH Use the new CMSEditLink extension on SiteTree #2778
Conversation
b075322
to
99ec817
Compare
99ec817
to
3682ef9
Compare
code/Controllers/CMSMain.php
Outdated
* | ||
* @see CMSEditLinkExtension::getEditLinkForManagedDataObject() | ||
*/ | ||
public function getEditLinkForManagedDataObject(SiteTree $obj): string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public function getEditLinkForManagedDataObject(SiteTree $obj): string | |
public function getCMSEditLinkForManagedDataObject(SiteTree $obj): string |
code/Controllers/CMSMain.php
Outdated
/** | ||
* Get the link for editing a page. | ||
* | ||
* @see CMSEditLinkExtension::getEditLinkForManagedDataObject() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @see CMSEditLinkExtension::getEditLinkForManagedDataObject() | |
* @see CMSEditLinkExtension::getCMSEditLinkForManagedDataObject() |
code/Model/SiteTree.php
Outdated
* The class of the LeftAndMain controller where this class is managed. | ||
* @see CMSEditLinkExtension::getCanonicalEditOwner() | ||
*/ | ||
private static string $canonical_edit_owner = CMSMain::class; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private static string $canonical_edit_owner = CMSMain::class; | |
private static string $cms_edit_owner = CMSMain::class; |
3682ef9
to
c7bb8c3
Compare
Have merged admin PR, re-running CI |
Use the new
CMSEditLink
extension from silverstripe/silverstripe-admin#1361 inSiteTree
- this means ahas_many
relation from some page can set the page as its canonical edit owner and itsCMSEditLink()
method will automatically have a valid URL.Note
Related issue