LLMS_Notifications::load_view( string $trigger, string $path = null, string $prefix = null )

Load a single view


Description Description


Parameters Parameters

$trigger

(string) (Required) Trigger id (eg: lesson_complete).

$path

(string) (Optional) Full path to the view file, allows third parties to load external views.

Default value: null

$prefix

(string) (Optional) Classname prefix. Defaults to "LLMS". Can be used by 3rd parties to adjust the prefix in accordance with the projects standards.

Default value: null


Top ↑

Return Return

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


Top ↑

Source Source

File: includes/notifications/class.llms.notifications.php

	public function load_view( $trigger, $path = null, $prefix = null ) {

		// Default path for core views.
		if ( ! $path ) {
			$path = $this->get_directory() . 'views/class.llms.notification.view.' . $this->name_to_file( $trigger ) . '.php';
		}

		if ( file_exists( $path ) ) {

			require_once $path;
			$this->views[ $this->get_view_classname( $trigger, $prefix ) ] = $trigger;
			return true;

		}

		return false;

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.8.0
3.24.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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