Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Block/Post/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
use Magento\Search\Model\QueryFactory;
use Comwrap\ElasticsuiteBlog\Model\ResourceModel\Post\Fulltext\CollectionFactory as PostCollectionFactory;

#[\AllowDynamicProperties]

class Result extends \Magento\Framework\View\Element\Template
{
/**
Expand Down
3 changes: 3 additions & 0 deletions Block/Post/Suggest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
use Comwrap\ElasticsuiteBlog\Model\ResourceModel\Post\Fulltext\CollectionFactory as PostCollectionFactory;
use Comwrap\ElasticsuiteBlog\Helper\Configuration;

#[\AllowDynamicProperties]

class Suggest extends \Magento\Framework\View\Element\Template
{
/**
Expand Down Expand Up @@ -134,6 +136,7 @@ public function getShowAllUrl()
private function initPostCollection($collectionFactory)
{
$postCollection = $collectionFactory->create();
$postCollection->setStoreId($this->_storeManager->getStore()->getId());
$postCollection->addFieldToFilter('is_active', 1);

$postCollection->setPageSize($this->getNumberOfResults());
Expand Down
2 changes: 2 additions & 0 deletions Controller/Result/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
namespace Comwrap\ElasticsuiteBlog\Controller\Result;


#[\AllowDynamicProperties]

class Index extends \Magento\Framework\App\Action\Action
{
/**
Expand Down
2 changes: 2 additions & 0 deletions Helper/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use Smile\ElasticsuiteCore\Helper\AbstractConfiguration;


#[\AllowDynamicProperties]

class Configuration extends AbstractConfiguration
{
/**
Expand Down
2 changes: 2 additions & 0 deletions Model/Autocomplete/Post/DataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* Catalog product autocomplete data provider.
*
*/
#[\AllowDynamicProperties]

class DataProvider implements DataProviderInterface
{
/**
Expand Down
2 changes: 2 additions & 0 deletions Model/Post/Indexer/Fulltext.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use Magento\Framework\Indexer\ActionInterface;
use Magento\Framework\Mview\ActionInterface as MviewActionInterface;

#[\AllowDynamicProperties]

class Fulltext implements ActionInterface, MviewActionInterface
{
/**
Expand Down
2 changes: 2 additions & 0 deletions Model/Post/Indexer/Fulltext/Action/Full.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
use Comwrap\ElasticsuiteBlog\Model\ResourceModel\Post\Indexer\Fulltext\Action\Full as ResourceModel;
use Magento\Cms\Model\Template\FilterProvider;

#[\AllowDynamicProperties]

class Full
{
/**
Expand Down
6 changes: 4 additions & 2 deletions Model/ResourceModel/Post/Fulltext/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
use Smile\ElasticsuiteCore\Search\RequestInterface;
use Smile\ElasticsuiteCore\Search\Request\BucketInterface;

#[\AllowDynamicProperties]

class Collection extends \Magefan\Blog\Model\ResourceModel\Post\Collection
{
/**
Expand Down Expand Up @@ -125,9 +127,9 @@ public function setStoreId($storeId)
*
* @return int
*/
public function getStoreId()
public function getStoreId(): int
{
return $this->storeId;
return (int) $this->storeId;
}

/**
Expand Down
2 changes: 2 additions & 0 deletions Model/ResourceModel/Post/Indexer/Fulltext/Action/Full.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
use Magento\Store\Model\StoreManagerInterface;
use Smile\ElasticsuiteCore\Model\ResourceModel\Indexer\AbstractIndexer;

#[\AllowDynamicProperties]

class Full extends AbstractIndexer
{
/**
Expand Down
2 changes: 2 additions & 0 deletions Plugin/Indexer/Post/Save/ReindexPostAfterSave.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
use Magefan\Blog\Model\Post;


#[\AllowDynamicProperties]

class ReindexPostAfterSave
{
/**
Expand Down
2 changes: 2 additions & 0 deletions Setup/InstallSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
use \Magento\Framework\Setup\SchemaSetupInterface;
use \Magento\Eav\Setup\EavSetup;

#[\AllowDynamicProperties]

class InstallSchema implements InstallSchemaInterface
{
/**
Expand Down
4 changes: 3 additions & 1 deletion view/frontend/templates/blog_post_suggest.phtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php /** @var \Comwrap\ElasticsuiteBlog\Block\Post\Suggest */ ?>
<?php
/** @var \Comwrap\ElasticsuiteBlog\Block\Post\Suggest */
?>
<?php if ($block->canShowBlock()): ?>
<div class="search results">
<h2><?php echo __('Results in blog posts.')?></h2>
Expand Down