Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 401 and 402] [Versions 401 and 403]

(no description)

File Size: 130 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

sticky_footer:: (6 methods):
  __construct()
  set_content()
  add_classes()
  add_attribute()
  export_for_template()
  get_template_name()


Class: sticky_footer  - X-Ref

Class to render a sticky footer element.

Sticky footer can be rendered at any moment if the page (even inside a form) but
it will be displayed at the bottom of the page.

Important: note that pages can only display one sticky footer at once.

Important: not all themes are compatible with sticky footer. If the current theme
is not compatible it will be rendered as a standard div element.

__construct(string $stickycontent = '', ?string $stickyclasses = null, array $attributes = [])   X-Ref
Constructor.

param: string $stickycontent the footer content
param: string|null $stickyclasses extra CSS classes
param: array $attributes extra html attributes (attribute => value)

set_content(string $stickycontent)   X-Ref
Set the footer contents.

param: string $stickycontent the footer content

add_classes(string $stickyclasses)   X-Ref
Add extra classes to the sticky footer.

param: string $stickyclasses the extra classes

add_attribute(string $atribute, string $value)   X-Ref
Add extra attributes to the sticky footer element.

param: string $atribute the attribute
param: string $value the value

export_for_template(\renderer_base $output)   X-Ref
Export this data so it can be used as the context for a mustache template (core/inplace_editable).

param: renderer_base $output typically, the renderer that's calling this function
return: array data context for a mustache template

get_template_name(\renderer_base $renderer)   X-Ref
Get the name of the template to use for this templatable.

param: \renderer_base $renderer The renderer requesting the template name
return: string the template name