Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core_course\local\entity\content_item Class Reference

The content_item class. More...

Public Member Functions

 __construct (int $id, string $name, title $title, moodle_url $link, string $icon, string $help, int $archetype, string $componentname, string $purpose, bool $branded=false)
 The content_item constructor.
 
 get_archetype ()
 Get the archetype of this item.
 
 get_component_name ()
 Get the name of the component with which this content item is associated.
 
 get_help ()
 Get the help description of this item.
 
 get_icon ()
 Get the icon html for this item.
 
 get_id ()
 Get the id of this item.
 
 get_link ()
 Get the link to the creation page of this item.
 
 get_name ()
 Get the name of this item.
 
 get_purpose ()
 Get purpose for this item.
 
 get_title ()
 Get the human readable title of this item.
 
 is_branded ()
 Whether this item is branded.
 

Detailed Description

The content_item class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core_course\local\entity\content_item::__construct ( int $id,
string $name,
title $title,
moodle_url $link,
string $icon,
string $help,
int $archetype,
string $componentname,
string $purpose,
bool $branded = false )

The content_item constructor.

Parameters
int$idId number.
string$nameName of the item, not human readable.
title$titleHuman readable title for the item.
moodle_url$linkThe URL to the creation page, with any item specific params
string$iconHTML containing the icon for the item
string$helpThe description of the item.
int$archetypethe archetype for the content item (see MOD_ARCHETYPE_X definitions in lib/moodlelib.php).
string$componentnamethe name of the component/plugin with which this content item is associated.
string$purposethe purpose type of this component.
bool$brandedwhether or not this item is branded.

Member Function Documentation

◆ get_archetype()

core_course\local\entity\content_item::get_archetype ( )

Get the archetype of this item.

Return values
int

◆ get_component_name()

core_course\local\entity\content_item::get_component_name ( )

Get the name of the component with which this content item is associated.

Return values
string

◆ get_help()

core_course\local\entity\content_item::get_help ( )

Get the help description of this item.

Return values
string

◆ get_icon()

core_course\local\entity\content_item::get_icon ( )

Get the icon html for this item.

Return values
string

◆ get_id()

core_course\local\entity\content_item::get_id ( )

Get the id of this item.

Return values
int

◆ get_link()

core_course\local\entity\content_item::get_link ( )

Get the link to the creation page of this item.

Return values
moodle_url

◆ get_name()

core_course\local\entity\content_item::get_name ( )

Get the name of this item.

Return values
string

◆ get_purpose()

core_course\local\entity\content_item::get_purpose ( )

Get purpose for this item.

Return values
string

◆ get_title()

core_course\local\entity\content_item::get_title ( )

Get the human readable title of this item.

Return values
title

◆ is_branded()

core_course\local\entity\content_item::is_branded ( )

Whether this item is branded.

Return values
booltrue if this item is branded, false otherwise.

The documentation for this class was generated from the following file: