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().
Parameters Parameters
- $arr
-
(array) (Required) Data to be serialized.
Return Return
(array)
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; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.3.0 | |
3.16.0 | Introduced. |