Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Disabling Requirements from controller


2 Posts   166 Views


30 April 2014 at 10:06pm Community Member, 5 Posts

From looking at SSViewer it is possible to disable the output of Requirements to the template via the 'includeRequirements(true/false)' method - however I can't work out how to access the instance of SSViewer from my controller to be able to set this option.

I've tried things like this within my action:

$viewer = $this->getViewer($this->getAction());

and it doesn't seem to make any difference... any help would be appreciated.



4 May 2014 at 9:44pm Forum Moderator, 1091 Posts

I'm not sure what you are trying to do, and I've never used this function. So just to make sure: are you aiming at removing one or more requirements that are, for instance, loaded from another module? In that case have a look at clearing and blocking: