Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

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

Contains the content_item class.

Copyright: 2020 Jake Dallimore <jrhdallimore@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 154 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

content_item:: (9 methods):
  __construct()
  get_component_name()
  get_help()
  get_archetype()
  get_id()
  get_name()
  get_title()
  get_link()
  get_icon()


Class: content_item  - X-Ref

The content_item class.

__construct(int $id, string $name, title $title, \moodle_url $link, string $icon, string $help,int $archetype, string $componentname)   X-Ref
The content_item constructor.

param: int $id Id number.
param: string $name Name of the item, not human readable.
param: title $title Human readable title for the item.
param: \moodle_url $link The URL to the creation page, with any item specific params
param: string $icon HTML containing the icon for the item
param: string $help The description of the item.
param: int $archetype the archetype for the content item (see MOD_ARCHETYPE_X definitions in lib/moodlelib.php).
param: string $componentname the name of the component/plugin with which this content item is associated.

get_component_name()   X-Ref
Get the name of the component with which this content item is associated.

return: string

get_help()   X-Ref
Get the help description of this item.

return: string

get_archetype()   X-Ref
Get the archetype of this item.

return: int

get_id()   X-Ref
Get the id of this item.

return: int

get_name()   X-Ref
Get the name of this item.

return: string

get_title()   X-Ref
Get the human readable title of this item.

return: title

get_link()   X-Ref
Get the link to the creation page of this item.

return: \moodle_url

get_icon()   X-Ref
Get the icon html for this item.

return: string