mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
Merge pull request #71 from silverstripe-terraformers/feature/update-settings-fields-hook
v4: Add hook to updateSettingsFields so that devs can show/hide when desired
This commit is contained in:
commit
d74066c0de
@ -328,6 +328,10 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
|||||||
*/
|
*/
|
||||||
public function updateSettingsFields(FieldList $fields)
|
public function updateSettingsFields(FieldList $fields)
|
||||||
{
|
{
|
||||||
|
if ($this->owner->hasMethod('displayContentReview') && !$this->owner->displayContentReview()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$module = ModuleLoader::getModule('silverstripe/contentreview');
|
$module = ModuleLoader::getModule('silverstripe/contentreview');
|
||||||
Requirements::javascript($module->getRelativeResourcePath('client/dist/js/contentreview.js'));
|
Requirements::javascript($module->getRelativeResourcePath('client/dist/js/contentreview.js'));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user