Fandom

Wikia Developers Wiki

Nirvana/WikiaSpecialPageController

< Nirvana

888pages on
this wiki
Add New Page
Talk0 Share

Most administrative tools are created as Special Pages. Typically a Special Page will have business logic and templates just like a controller so we have made a SpecialPageController class with an execute() method that wraps the normal Controller sendRequest function.  A function called execute is the entry point to the normal SpecialPage class and this one as well, but the execute() method just calls index() on the controller and renders the result.  The general idea is that the SpecialPage acts as a single page app and all other content should be fetched via Ajax. 

Special Page Controller class features

  • The class must extend WikiaSpecialPageController AND have Controller in the name.
  • There is a protected $specialPage variable if you need to access the base Special Page class directly, but this is not recommended. If you need to call a function of the Special Page, you can call any function such as $this->getName() normally.
  • Otherwise identical to Nirvana/WikiaController

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.