Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/magento/module-review/Model/ResourceModel/Review/Summary/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/magento/module-review/Model/ResourceModel/Review/Summary/Collection.php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Magento\Review\Model\ResourceModel\Review\Summary;

/**
 * Review summery collection
 *
 * @author      Magento Core Team <[email protected]>
 */
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
    /**
     * @inheritdoc
     */
    protected function _construct()
    {
        $this->_init(
            \Magento\Review\Model\Review\Summary::class,
            \Magento\Review\Model\ResourceModel\Review\Summary::class
        );
    }

    /**
     * Add entity filter
     *
     * @param int|string $entityId
     * @param int $entityType
     * @return $this
     */
    public function addEntityFilter($entityId, $entityType = 1)
    {
        $this->_select->where('entity_pk_value IN(?)', $entityId)->where('entity_type = ?', $entityType);
        return $this;
    }

    /**
     * Add store filter
     *
     * @param array|int $storeId
     * @return $this
     */
    public function addStoreFilter($storeId)
    {
        if (is_numeric($storeId)) {
            $this->_select->where('store_id = ?', $storeId);
        } else {
            $this->_select->where('store_id IN (?)', $storeId);
        }

        return $this;
    }
}

Spamworldpro Mini