LLMS_Notifications::load_controller( string $trigger, string $path = null )
Load and initialize a single controller
Description Description
Parameters Parameters
- $trigger
-
(string) (Required) trigger id (eg: lesson_complete)
- $path
-
(string) (Optional) full path to the controller file, allows third parties to load external controllers
Default value: null
Return Return
(boolean) true if the controller is added and loaded, false otherwise
Source Source
File: includes/notifications/class.llms.notifications.php
public function load_controller( $trigger, $path = null ) { // default path for core views if ( ! $path ) { $path = $this->get_directory() . 'controllers/class.llms.notification.controller.' . $this->name_to_file( $trigger ) . '.php'; } if ( file_exists( $path ) ) { $this->controllers[ $trigger ] = require_once $path; return true; } return false; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.8.0 | Introduced. |