Component.php
2 years ago
ComponentTrait.php
3 years ago
Field.php
3 years ago
FormFactory.php
3 years ago
Section.php
3 years ago
Subsection.php
3 years ago
Tab.php
3 years ago
ComponentTrait.php
60 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Product Form Traits |
| 4 | */ |
| 5 | |
| 6 | namespace Automattic\WooCommerce\Internal\Admin\ProductForm; |
| 7 | |
| 8 | defined( 'ABSPATH' ) || exit; |
| 9 | |
| 10 | /** |
| 11 | * ComponentTrait class. |
| 12 | */ |
| 13 | trait ComponentTrait { |
| 14 | /** |
| 15 | * Component ID. |
| 16 | * |
| 17 | * @var string |
| 18 | */ |
| 19 | protected $id; |
| 20 | |
| 21 | /** |
| 22 | * Plugin ID. |
| 23 | * |
| 24 | * @var string |
| 25 | */ |
| 26 | protected $plugin_id; |
| 27 | |
| 28 | /** |
| 29 | * Product form component location. |
| 30 | * |
| 31 | * @var string |
| 32 | */ |
| 33 | protected $location; |
| 34 | |
| 35 | /** |
| 36 | * Product form component order. |
| 37 | * |
| 38 | * @var number |
| 39 | */ |
| 40 | protected $order; |
| 41 | |
| 42 | /** |
| 43 | * Return id. |
| 44 | * |
| 45 | * @return string |
| 46 | */ |
| 47 | public function get_id() { |
| 48 | return $this->id; |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Return plugin id. |
| 53 | * |
| 54 | * @return string |
| 55 | */ |
| 56 | public function get_plugin_id() { |
| 57 | return $this->plugin_id; |
| 58 | } |
| 59 | } |
| 60 |