| 1 |
<?php |
| 2 |
|
| 3 |
namespace Yoast\WP\SEO\Introductions\Application; |
| 4 |
|
| 5 |
use Yoast\WP\SEO\Helpers\Current_Page_Helper; |
| 6 |
use Yoast\WP\SEO\Helpers\Product_Helper; |
| 7 |
use Yoast\WP\SEO\Helpers\User_Helper; |
| 8 |
use Yoast\WP\SEO\Introductions\Domain\Introduction_Interface; |
| 9 |
|
| 10 |
/** |
| 11 |
* Represents the introduction for the Google Docs Addon feature. |
| 12 |
*/ |
| 13 |
class Google_Docs_Addon_Upsell implements Introduction_Interface { |
| 14 |
|
| 15 |
use User_Allowed_Trait; |
| 16 |
|
| 17 |
public const ID = 'google-docs-addon-upsell'; |
| 18 |
|
| 19 |
/** |
| 20 |
* Holds the user helper. |
| 21 |
* |
| 22 |
* @var User_Helper |
| 23 |
*/ |
| 24 |
private $user_helper; |
| 25 |
|
| 26 |
/** |
| 27 |
* Holds the product helper. |
| 28 |
* |
| 29 |
* @var Product_Helper |
| 30 |
*/ |
| 31 |
private $product_helper; |
| 32 |
|
| 33 |
/** |
| 34 |
* Holds the current page helper. |
| 35 |
* |
| 36 |
* @var Current_Page_Helper |
| 37 |
*/ |
| 38 |
private $current_page_helper; |
| 39 |
|
| 40 |
/** |
| 41 |
* Constructs the introduction. |
| 42 |
* |
| 43 |
* @param User_Helper $user_helper The user helper. |
| 44 |
* @param Product_Helper $product_helper The product helper. |
| 45 |
* @param Current_Page_Helper $current_page_helper The current page helper. |
| 46 |
*/ |
| 47 |
public function __construct( User_Helper $user_helper, Product_Helper $product_helper, Current_Page_Helper $current_page_helper ) { |
| 48 |
$this->user_helper = $user_helper; |
| 49 |
$this->product_helper = $product_helper; |
| 50 |
$this->current_page_helper = $current_page_helper; |
| 51 |
} |
| 52 |
|
| 53 |
/** |
| 54 |
* Returns the ID. |
| 55 |
* |
| 56 |
* @return string The ID. |
| 57 |
*/ |
| 58 |
public function get_id() { |
| 59 |
return self::ID; |
| 60 |
} |
| 61 |
|
| 62 |
/** |
| 63 |
* Returns the requested pagination priority. Lower means earlier. |
| 64 |
* |
| 65 |
* @return int The priority. |
| 66 |
*/ |
| 67 |
public function get_priority() { |
| 68 |
return 20; |
| 69 |
} |
| 70 |
|
| 71 |
/** |
| 72 |
* Returns whether this introduction should show. |
| 73 |
* We no longer show this introduction, so we always return false. |
| 74 |
* |
| 75 |
* @return bool Whether this introduction should show. |
| 76 |
*/ |
| 77 |
public function should_show() { |
| 78 |
return false; |
| 79 |
} |
| 80 |
} |
| 81 |
|