PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.0
Elementor Website Builder – more than just a page builder v4.2.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / data / base / sub-endpoint.php

sub-endpoint.php in Elementor Website Builder – more than just a page builder 4.2.0, at data/base/sub-endpoint.php

41 lines 760 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Data\Base;
3
4 /**
5 * TODO: Add test.
6 */
7 abstract class SubEndpoint extends Endpoint {
8
9 /**
10 * @var Endpoint
11 */
12 protected $parent_endpoint;
13
14 /**
15 * @var string
16 */
17 protected $parent_route = '';
18
19 public function __construct( $parent_route, $parent_endpoint ) {
20 $this->parent_endpoint = $parent_endpoint;
21 $this->parent_route = $parent_route;
22
23 parent::__construct( $this->parent_endpoint->controller );
24 }
25
26 /**
27 * Get parent route.
28 *
29 * @return \Elementor\Data\Base\Endpoint
30 */
31 public function get_parent() {
32 return $this->parent_endpoint;
33 }
34
35 public function get_base_route() {
36 $controller_name = $this->controller->get_name();
37
38 return $controller_name . '/' . $this->parent_route . $this->get_name();
39 }
40 }
41