* typically based on the namespace or some other aspect of the title, such as a special suffix
* (e.g. ".svg" for SVG content).
*
+ * @note: this calls the ContentHandlerCanBeUsedOn hook which may be used to override which
+ * content model can be used where.
+ *
* @param Title $title the page's title.
*
* @return bool true if content of this kind can be used on the given page, false otherwise.
*/
public function canBeUsedOn( Title $title ) {
- return true;
+ $ok = true;
+
+ wfRunHooks( 'ContentModelCanBeUsedOn', array( $this->getModelID(), $title, &$ok ) );
+
+ return $ok;
}
/**
}
/**
- * Get parser options suitable for rendering the primary article wikitext
+ * Get parser options suitable for rendering and caching the article
*
* @param IContextSource|User|string $context One of the following:
* - IContextSource: Use the User and the Language of the provided
* - 'canonical': Canonical options (anonymous user with default
* preferences and content language).
*
- * @param IContextSource|User|string $context
- *
* @throws MWException
* @return ParserOptions
*/