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


Top ↑

Return Return

(boolean) true if the controller is added and loaded, false otherwise.


Top ↑

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;

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.8.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.