here", [
':href' => Url::fromRoute('filter.admin_overview')->toString(),
]);
}
}
/**
* Implements hook_theme().
*
* Thanks to emfabric for this implementation. http://drupal.org/node/221156
*/
function footnotes_theme() {
return [
'footnote_link' => [
'variables' => [
'fn' => NULL,
],
],
'footnote_list' => [
'variables' => [
'footnotes'=> NULL,
],
],
];
}
/**
* Helper for other filters, check if Footnotes is present in your filter chain.
*
* Note: Due to changes in Filter API, the arguments to this function have
* changed in Drupal 7.
*
* Other filters may leverage the Footnotes functionality in a simple way:
* by outputting markup with ... tags within.
*
* This creates a dependency, the Footnotes filter must be present later in
* "Input format". By calling this helper function the other filters that
* depend on Footnotes may check whether Footnotes is present later in the chain
* of filters in the current Input format.
*
* If this function returns true, the caller may depend on Footnotes. Function
* returns false if caller may not depend on Footnotes.
*
* You should also put "dependencies = footnotes" in your module.info file.
*
* Example usage:
*
* _filter_example_process( $text, $filter, $format ) {
* ...
* if(footnotes_is_footnotes_later($format, $filter)) {
* //output markup which may include [fn] tags
* }
* else {
* // must make do without footnotes features
* // can also emit warning/error that user should install and configure
* // footnotes module
* }
* ...
* }
*
*
* @param object $format
* The text format object caller is part of.
* @param object $caller_filter
* The filter object representing the caller (in this text format).
*
* @return True
* If Footnotes is present after $caller in $format.
*/
function footnotes_is_footnotes_later($format, $caller_filter) {
return $format['filter_footnotes']['weight'] > $caller_filter['weight'];
}