coursegroup_service
class coursegroup_service extends item_service
Service responsible for business rules of course groups.
Constants
| TYPE |
|
| FILEMANAGEROPTIONS |
|
| PER_PAGE |
|
Properties
| static protected array<string,object> | $resolved_instances | The resolved object instances (cached roots). |
from abstract_facade |
| static protected bool | $cached | Indicates if resolved instances should be cached. |
from abstract_facade |
| $id | |||
| $contextids |
Methods
Dynamically handle static method calls on the facade proxy.
Return the service accessor key for this facade.
Swap a given instance for testing or runtime overriding.
Clear one cached facade instance.
Resolve the instance from the Kernel container.
Deletes a coursegroup item.
No description
Returns a single coursegroup item.
Returns all coursegroup items.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Returns list of courses available for this course group.
Returns list of context IDs from courses.
No description
Details
in
abstract_facade at line 62
static mixed
__callStatic(string $method, array $args)
Dynamically handle static method calls on the facade proxy.
in
item_service at line 43
static string
get_facade_accessor()
Return the service accessor key for this facade.
in
abstract_facade at line 94
static object
get_facade_root()
Get the root object behind the facade.
in
abstract_facade at line 104
static void
swap(object $instance)
Swap a given instance for testing or runtime overriding.
in
abstract_facade at line 118
static void
clear_resolved_instance(string $name)
Clear one cached facade instance.
in
abstract_facade at line 126
static void
clearresolved_instances()
Clear all cached facade instances.
in
abstract_facade at line 134
static void
disable_cache()
Disable instance caching (useful for testing).
in
abstract_facade at line 143
static void
enable_cache()
Enable instance caching.
in
abstract_facade at line 151
static void
reset()
Reset the facade: clear cache and re-enable caching.
in
abstract_facade at line 168
static protected object
resolve_facade_instance(string $name)
Resolve the instance from the Kernel container.
at line 77
item_interface
create(item_dto_interface $dto)
Creates a new coursegroup item.
at line 113
item_interface
update(item_dto_interface $dto)
Updates an existing course group, including the image filemanager.
at line 192
void
delete(int $id)
Deletes a coursegroup item.
in
item_service at line 38
void
static() $\local_middag\framework\contract\domain\item_interface find(int $id)
No description
in
item_service at line 38
static array
get_metadata(int $id)
No description
in
item_service at line 38
static array
find_by_type(string $type)
No description
in
item_service at line 38
static item_repository_interface
get_repository()
No description
at line 146
item_interface|null
find(int $id)
Returns a single coursegroup item.
at line 171
array
all()
Returns all coursegroup items.
at line 176
array
all_enablers()
No description
at line 197
moodle_url|string
background(coursegroup_item $coursegroup_item)
No description
at line 224
moodle_url
editurl()
No description
at line 233
moodle_url
deleteurl()
No description
at line 245
array
get_contextids()
No description
at line 262
int
get_expiration(coursegroup_item $item)
No description
at line 285
string
contents(coursegroup_item $item)
Generates HTML representation of course contents.
at line 333
array
get_contents(coursegroup_item $item)
Returns course and modules contained in this group.
at line 381
bool
item_completed()
No description
at line 421
false|moodle_url
item_get_url(coursegroup_item $item)
Returns the first accessible URL for the user.
at line 433
void
item_available()
No description
at line 441
bool
pending()
No description
at line 451
bool
inprogress()
No description
at line 465
bool
enrol()
No description
at line 498
coursegroup_item|false
get_coursegroup_by_courseid(int $id)
No description
at line 529
array
get_course_options(int $id = 0)
Returns list of courses available for this course group.
at line 563
array
get_course_with_contextid_options(int $id = 0)
Returns list of context IDs from courses.
at line 577
array
list($current_page, $page_url)
No description