ENHANCEMENT Enable request handlers to be extended

This commit is contained in:
Damian Mooyman 2018-03-21 15:50:31 +13:00
parent e6ff8bc681
commit 26402f3bb5
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A
2 changed files with 3 additions and 2 deletions

View File

@ -560,9 +560,11 @@ class RequestHandler extends ViewableData
// Check configured url_segment // Check configured url_segment
$url = $this->config()->get('url_segment'); $url = $this->config()->get('url_segment');
if ($url) { if ($url) {
$link = Controller::join_links($url, $action, '/');
// Give extensions the chance to modify by reference // Give extensions the chance to modify by reference
$this->extend('updateLink', $link, $action); $this->extend('updateLink', $link, $action);
return Controller::join_links($url, $action, '/'); return $link;
} }
// no link defined by default // no link defined by default

View File

@ -48,7 +48,6 @@ trait Extensible
*/ */
private static $unextendable_classes = array( private static $unextendable_classes = array(
ViewableData::class, ViewableData::class,
RequestHandler::class,
); );
/** /**