Files
drmaterac.pl/modules/creativeelements/includes/base/widget-premium-base.php
2025-07-13 11:19:53 +02:00

69 lines
2.2 KiB
PHP

<?php
/**
* Creative Elements - live PageBuilder [in-stock]
*
* @author WebshopWorks
* @copyright 2019-2022 WebshopWorks.com
* @license In-stock license
*/
namespace CE;
defined('_PS_VERSION_') or die;
abstract class WidgetPremiumBase extends WidgetBase
{
public function getCategories()
{
return ['premium'];
}
public function getDemoLink()
{
return '';
}
protected function _registerControls()
{
$this->startControlsSection(
'section_premium',
[
'label' => $this->getTitle(),
]
);
$this->addControl(
'premium',
[
'type' => ControlsManager::RAW_HTML,
'raw' => (
'<div class="elementor-nerd-box">' .
'<i class="elementor-nerd-box-icon eicon-hypster" aria-hidden="true"></i>
<div class="elementor-nerd-box-title">' .
__('Premium Widget') .
'</div>
<div class="elementor-nerd-box-message">' .
sprintf(__('Use %s widget and dozens more premium features to extend your toolbox and build sites faster and better.'), $this->getTitle()) .
'</div>
<a class="elementor-nerd-box-link elementor-button elementor-button-default elementor-go-pro" href="' . esc_attr(Helper::getBuyLicenseLink($this->getName())) . '" target="_blank">' .
__('Buy License') .
'</a>' . (
!$this->getDemoLink() ? '' : '<br><br>
<a class="elementor-button-default elementor-button elementor-button-success" href="' . esc_attr($this->getDemoLink() . '?utm_source=premium-widget&utm_medium=backoffice&utm_campaign=in-stock') . '" target="_blank">' .
__('See it in action') .
'</a>'
) . '
</div>'
),
]
);
$this->endControlsSection();
}
protected function _contentTemplate()
{
echo '<!-- Premium Widget -->';
}
}