Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
- <module name="Vendor_Module" setup_version="2.1.0">
- <sequence>
- <module name="Magento_Review"/>
- </sequence>
- </module>
- </config>
- <?xml version="1.0"?>
- <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
- <preference for="MagentoReportsBlockAdminhtmlReviewCustomer" type="VendorModuleBlockAdminhtmlReviewCustomer" />
- <preference for="MagentoReportsModelResourceModelReviewCustomerCollection" type="VendorModuleModelResourceModelReviewCustomerCollection" />
- </config>
- <?php
- namespace VendorModuleBlockAdminhtmlReview;
- class Customer extends MagentoReportsBlockAdminhtmlReviewCustomer
- {
- protected function _prepareLayout()
- {
- parent::_prepareLayout();
- $customerNameColumn = $this->getChildBlock('grid')
- ->getChildBlock('grid.columnSet')
- ->getChildBlock('customer_name');
- $customerNameColumn->setFilterIndex([
- 'customer.firstname',
- 'customer.lastname'
- ]);
- return $this;
- }
- }
- <?php
- namespace VendorModuleModelResourceModelReviewCustomer;
- class Collection extends MagentoReportsModelResourceModelReviewCustomerCollection
- {
- public function addFieldToFilter($field, $condition = null)
- {
- if (is_array($field) && array_key_exists('like', $condition)) {
- $condition = array_fill(0, count($field), $condition);
- }
- return parent::addFieldToFilter($field, $condition);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement