Skip to content

Commit

Permalink
0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
haihv433 committed Jul 8, 2023
1 parent 9030897 commit 8f52c20
Show file tree
Hide file tree
Showing 77 changed files with 3,559 additions and 5,171 deletions.
17 changes: 17 additions & 0 deletions Block/View/Element/Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,27 @@

namespace Goomento\PageBuilder\Block\View\Element;

use Goomento\PageBuilder\Helper\EncryptorHelper;
use Goomento\PageBuilder\Traits\TraitWidgetBlock;
use Magento\Framework\View\Element\Template;

class Widget extends Template
{
use TraitWidgetBlock;

/**
* @inheritDoc
*/
public function getCacheKeyInfo()
{
$keys = parent::getCacheKeyInfo();
if ($this->getWidget()) {
$settings = $this->getWidget()->getSettings();
// Reference the key via widget settings
$keys['builder_cache_key'] = EncryptorHelper::uniqueContextId($settings);
$keys['builder_widget_id'] = $this->getWidget()->getId();
}

return $keys;
}
}
Loading

0 comments on commit 8f52c20

Please sign in to comment.