mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
API CHANGE: SiteTree::validURLSegment extendable (#5907)
Uses $this->extend('augmentValidURLSegment') so that (for instance) Translatable can hook this. (from r99849) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105538 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
097eb6b649
commit
0ab57094a0
@ -1516,7 +1516,16 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
'SiteTree',
|
'SiteTree',
|
||||||
"\"URLSegment\" = '$this->URLSegment' $IDFilter $parentFilter"
|
"\"URLSegment\" = '$this->URLSegment' $IDFilter $parentFilter"
|
||||||
);
|
);
|
||||||
return !($existingPage);
|
if ($existingPage) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$values = $this->extend('augmentValidURLSegment');
|
||||||
|
if (count($values) && !min($values)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user