| @@ -6,8 +6,10 @@ | ||
| 6 | 6 | use Templately\Builder\Source; |
| 7 | 7 | |
| 8 | 8 | class TemplateFactory { |
| 9 | 9 | protected $platform; |
| 10 | + | |
| 11 | + protected $template; | |
| 10 | 12 | protected $template_manager; |
| 11 | 13 | |
| 12 | 14 | public function __construct( $platform = 'elementor' ) { |
| 13 | 15 | $this->platform = $platform; |
| @@ -15,9 +17,9 @@ | ||
| 15 | 17 | } |
| 16 | 18 | |
| 17 | 19 | public function create( $type, $data, $meta = [] ) { |
| 18 | 20 | $data = wp_parse_args( $data ); |
| 19 | - | |
| 21 | + | |
| 20 | 22 | $meta = wp_parse_args( $meta, [ |
| 21 | 23 | Source::PLATFORM_META_KEY => $this->platform, |
| 22 | 24 | Source::TYPE_META_KEY => $type, |
| 23 | 25 | ] ); |
| @@ -27,5 +29,6 @@ | ||
| 27 | 29 | } |
| 28 | 30 | |
| 29 | 31 | return $this->template_manager->create( $type, $data, $meta ); |
| 30 | 32 | } |
| 31 | -} | |
| 33 | + | |
| 34 | +} | |