* the action is disabled, or null if it's not recognised
* @param string $action
* @param array $overrides
- * @return bool|null|string|callable
+ * @return bool|null|string|callable|Action
*/
final private static function getClass( $action, array $overrides ) {
global $wgActions;
*
* @since 1.21
*
- * @return array Always an empty array.
+ * @return array An array mapping action names (typically "view", "edit", "history" etc.) to
+ * either the full qualified class name of an Action class, a callable taking ( Page $page,
+ * IContextSource $context = null ) as parameters and returning an Action object, or an actual
+ * Action object. An empty array in this default implementation.
+ *
+ * @see Action::factory
*/
public function getActionOverrides() {
return [];
/**
* Call to WikiPage function for backwards compatibility.
- * @see WikiPage::getActionOverrides
+ * @see ContentHandler::getActionOverrides
*/
public function getActionOverrides() {
return $this->mPage->getActionOverrides();
}
/**
- * Returns overrides for action handlers.
- * Classes listed here will be used instead of the default one when
- * (and only when) $wgActions[$action] === true. This allows subclasses
- * to override the default behavior.
- *
* @todo Move this UI stuff somewhere else
*
- * @return array
+ * @see ContentHandler::getActionOverrides
*/
public function getActionOverrides() {
- $content_handler = $this->getContentHandler();
- return $content_handler->getActionOverrides();
+ return $this->getContentHandler()->getActionOverrides();
}
/**