Smile\ElasticsuiteCatalog\Setup\InstallData::addCategoryNameSearchAttribute PHP Метод

addCategoryNameSearchAttribute() приватный Метод

Create attribute on category to enable/disable name indexation for search.
private addCategoryNameSearchAttribute ( ) : void
Результат void
    private function addCategoryNameSearchAttribute()
    {
        // Installing the new attribute.
        $this->eavSetup->addAttribute(Category::ENTITY, 'use_name_in_product_search', ['type' => 'int', 'label' => 'Use category name in product search', 'input' => 'select', 'source' => 'Magento\\Eav\\Model\\Entity\\Attribute\\Source\\Boolean', 'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE, 'required' => true, 'default' => 1, 'visible' => true, 'note' => "If the category name is used for fulltext search on products.", 'sort_order' => 150, 'group' => 'General Information']);
        // Set the attribute value to 1 for all existing categories.
        $this->updateAttributeDefaultValue(Category::ENTITY, 'use_name_in_product_search', 1);
    }