Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
|
Class that is the return value for the _get_coursemodule_info module API function. More...
Public Attributes | |
string | $content |
HTML content to be displayed on the main page below the link (if any) for this course-module. | |
mixed | $customdata |
Custom data to be stored in modinfo for this activity; useful if there are cases when internal information for this activity type needs to be accessible from elsewhere on the course without making database queries. | |
string | $extraclasses |
Extra CSS class or classes to be added when this activity is displayed on the main page; space-separated string. | |
string | $icon |
Name of icon for this activity. | |
string | $iconcomponent |
Component for icon for this activity, as per image_url; leave blank to use default 'moodle' component. | |
$moodle_url | $iconurl |
External URL image to be used by activity as icon, useful for some external-tool modules like lti. | |
string | $name |
Name (text of link) for this activity; Leave unset to accept default name. | |
string | $onclick |
Content of onclick JavaScript; escaped HTML to be inserted as attribute value. | |
Class that is the return value for the _get_coursemodule_info module API function.
Note: For backward compatibility, you can also return a stdclass object from that function. The difference is that the stdclass object may contain an 'extra' field (deprecated, use extraclasses and onclick instead). The stdclass object may not contain the new fields defined here (content, extraclasses, customdata).
mixed cached_cm_info::$customdata |
Custom data to be stored in modinfo for this activity; useful if there are cases when internal information for this activity type needs to be accessible from elsewhere on the course without making database queries.
May be of any type but should be short.
string cached_cm_info::$icon |
Name of icon for this activity.
Normally, this should be used together with $iconcomponent to define the icon, as per image_url function. For backward compatibility, if this value is of the form 'mod/forum/icon' then an icon within that module will be used.
string cached_cm_info::$iconcomponent |
Component for icon for this activity, as per image_url; leave blank to use default 'moodle' component.
$moodle_url cached_cm_info::$iconurl |
External URL image to be used by activity as icon, useful for some external-tool modules like lti.
If set, takes precedence over $icon and $iconcomponent