Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400]

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: 168 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

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


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, string $purpose)   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.
param: string $purpose the purpose type of this component.

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

get_purpose()   X-Ref
Get purpose for this item.

return: string