![]() 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-quote/Model/ResourceModel/Quote/Address/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Quote\Model\ResourceModel\Quote\Address; /** * Quote addresses collection * * @author Magento Core Team <[email protected]> */ class Collection extends \Magento\Framework\Model\ResourceModel\Db\VersionControl\Collection { /** * Event prefix * * @var string */ protected $_eventPrefix = 'sales_quote_address_collection'; /** * Event object name * * @var string */ protected $_eventObject = 'quote_address_collection'; /** * Resource initialization * * @return void */ protected function _construct() { $this->_init( \Magento\Quote\Model\Quote\Address::class, \Magento\Quote\Model\ResourceModel\Quote\Address::class ); } /** * Setting filter on quote_id field but if quote_id is 0 * we should exclude loading junk data from DB * * @param int $quoteId * @return $this */ public function setQuoteFilter($quoteId) { $this->addFieldToFilter('quote_id', $quoteId ? $quoteId : ['null' => 1]); return $this; } /** * Redeclare after load method for dispatch event * * @return $this */ protected function _afterLoad() { parent::_afterLoad(); $this->_eventManager->dispatch($this->_eventPrefix . '_load_after', [$this->_eventObject => $this]); return $this; } }