Smile\ElasticsuiteCatalog\Setup\InstallData::updateDefaultValuesForNameAttributes PHP Method

updateDefaultValuesForNameAttributes() private method

Update default values for the name field of category and product entities.
    private function updateDefaultValuesForNameAttributes()
    {
        $setup = $this->eavSetup->getSetup();
        $connection = $setup->getConnection();
        $table = $setup->getTable('catalog_eav_attribute');
        $attributeIds = [$this->eavSetup->getAttributeId(\Magento\Catalog\Model\Product::ENTITY, 'name'), $this->eavSetup->getAttributeId(\Magento\Catalog\Model\Category::ENTITY, 'name')];
        foreach (['is_used_in_spellcheck', 'is_used_in_autocomplete'] as $configField) {
            foreach ($attributeIds as $attributeId) {
                $connection->update($table, [$configField => 1], $connection->quoteInto('attribute_id = ?', $attributeId));
            }
        }
    }