LLMS_Lesson::toArrayAfter( array $arr )
Add data to the course model when converted to array Called before data is sorted and returned by $this->jsonSerialize()
Description Description
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 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: