ActionsGenerator.php
9 months ago
AddRatingGenerator.php
1 year ago
CourseMetaGenerator.php
9 months ago
ElementGenerator.php
1 year ago
MaterialGenerator.php
1 year ago
Preview.php
1 year ago
PriceGenerator.php
9 months ago
SocialLinkGenerator.php
1 year ago
ThumbnailGenerator.php
1 year ago
MaterialGenerator.php
38 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Lesson view generator |
| 4 | * |
| 5 | * @package tutor-droip-elements |
| 6 | */ |
| 7 | |
| 8 | namespace TutorLMSDroip\ElementGenerator; |
| 9 | |
| 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | exit; // Exit if accessed directly. |
| 12 | } |
| 13 | |
| 14 | /** |
| 15 | * Class MaterialGenerator |
| 16 | * This class is used to define all material generator functions. |
| 17 | */ |
| 18 | trait MaterialGenerator { |
| 19 | |
| 20 | /** |
| 21 | * Generate material markup |
| 22 | * |
| 23 | * @return string |
| 24 | */ |
| 25 | private function generate_material_markup() { |
| 26 | |
| 27 | if ( isset( $this->options['post'] ) ) { |
| 28 | // $element_block = $this->group_elements_by_element_name(); |
| 29 | $settings = isset( $this->properties['settings'] ) ? $this->properties['settings'] : array(); |
| 30 | if ( $this->options['post']->post_type === $settings['type'] ) { |
| 31 | return $this->generate_common_element(); |
| 32 | } |
| 33 | } |
| 34 | return ''; |
| 35 | } |
| 36 | |
| 37 | } |
| 38 |