Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Disabling Requirements from controller

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

Page: 1
Go to End
Author Topic: 136 Views
  • prezet
    Avatar
    Community Member
    5 Posts

    Disabling Requirements from controller Link to this post

    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());
    $viewer->includeRequirements(false);
    $viewer->process($this->dataRecord);

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

    Thanks.

  • martimiz
    Avatar
    Forum Moderator
    1068 Posts

    Re: Disabling Requirements from controller Link to this post

    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:

    http://doc.silverstripe.org/framework/en/reference/requirements

    136 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.