LLMS_Section::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.section.php
public function toArrayAfter( $arr ) { $arr['lessons'] = array(); foreach ( $this->get_lessons() as $lesson ) { $arr['lessons'][] = $lesson->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: