LLMS_Lesson::toArrayAfter( array $arr )

Add data to the course model when converted to array


Description Description

Called before data is sorted and returned by $this->jsonSerialize().


Top ↑

Parameters Parameters

$arr

(array) (Required) Data to be serialized.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/models/model.llms.lesson.php

	public function toArrayAfter( $arr ) {

		if ( $this->has_quiz() ) {

			$quiz = $this->get_quiz();
			if ( $quiz ) {
				$arr['quiz'] = $quiz->toArray();
			}
		}

		return $arr;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.3.0
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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