PluginProbe
Elementor Website Builder – more than just a page builder / 3.1.0
Elementor Website Builder – more than just a page builder v3.1.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 3.1.0, at data/base/sub-endpoint.php

40 lines 753 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 // TODO: Add test.
5
6 abstract class SubEndpoint extends Endpoint {
7
8 /**
9 * @var Endpoint
10 */
11 protected $parent_endpoint;
12
13 /**
14 * @var string
15 */
16 protected $parent_route = '';
17
18 public function __construct( $parent_route, $parent_endpoint ) {
19 $this->parent_endpoint = $parent_endpoint;
20 $this->parent_route = $parent_route;
21
22 parent::__construct( $this->parent_endpoint->controller );
23 }
24
25 /**
26 * Get parent route.
27 *
28 * @return \Elementor\Data\Base\Endpoint
29 */
30 public function get_parent() {
31 return $this->parent_endpoint;
32 }
33
34 public function get_base_route() {
35 $controller_name = $this->controller->get_name();
36
37 return $controller_name . '/' . $this->parent_route . $this->get_name();
38 }
39 }
40