Campaign.php
2 years ago
Current_Traffic.php
2 years ago
Device.php
2 years ago
Geo.php
2 years ago
Page.php
2 years ago
Page_Author_Archive.php
2 years ago
Page_Date_Archive.php
2 years ago
Page_Home.php
2 years ago
Page_Not_Found.php
2 years ago
Page_Post_Type_Archive.php
2 years ago
Page_Search.php
2 years ago
Page_Singular.php
2 years ago
Page_Term_Archive.php
2 years ago
Page_Virtual.php
2 years ago
Referrer.php
2 years ago
View_Stats.php
2 years ago
Visitor.php
2 years ago
WooCommerce_Stats.php
2 years ago
Page_Virtual.php
70 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP\Models; |
| 4 | |
| 5 | /** @internal */ |
| 6 | class Page_Virtual extends \IAWP\Models\Page |
| 7 | { |
| 8 | private $virtual_page_id; |
| 9 | public function __construct($row) |
| 10 | { |
| 11 | $this->virtual_page_id = $row->virtual_page_id; |
| 12 | parent::__construct($row); |
| 13 | } |
| 14 | protected function resource_key() : string |
| 15 | { |
| 16 | return 'virtual_page_id'; |
| 17 | } |
| 18 | protected function resource_value() : string |
| 19 | { |
| 20 | return $this->virtual_page_id; |
| 21 | } |
| 22 | protected function calculate_is_deleted() : bool |
| 23 | { |
| 24 | return \false; |
| 25 | } |
| 26 | protected function calculate_url() |
| 27 | { |
| 28 | return null; |
| 29 | } |
| 30 | protected function calculate_title() |
| 31 | { |
| 32 | switch ($this->virtual_page_id) { |
| 33 | case "wc_checkout_success": |
| 34 | return \__('Checkout Success', 'independent-analytics'); |
| 35 | } |
| 36 | } |
| 37 | protected function calculate_type() |
| 38 | { |
| 39 | return 'page'; |
| 40 | } |
| 41 | protected function calculate_type_label() |
| 42 | { |
| 43 | return 'Page'; |
| 44 | } |
| 45 | protected function calculate_icon() |
| 46 | { |
| 47 | return '<span class="dashicons dashicons-admin-page"></span>'; |
| 48 | } |
| 49 | protected function calculate_author_id() |
| 50 | { |
| 51 | return null; |
| 52 | } |
| 53 | protected function calculate_author() |
| 54 | { |
| 55 | return null; |
| 56 | } |
| 57 | protected function calculate_avatar() |
| 58 | { |
| 59 | return null; |
| 60 | } |
| 61 | protected function calculate_date() |
| 62 | { |
| 63 | return null; |
| 64 | } |
| 65 | protected function calculate_category() |
| 66 | { |
| 67 | return []; |
| 68 | } |
| 69 | } |
| 70 |