public function addUseStorePositionsAttribute(\Magento\Eav\Setup\EavSetup $eavSetup)
    {
        $eavSetup->addAttribute(
            Category::ENTITY,
            'use_store_positions',
            [
                'type'       => 'int',
                'input'      => 'select',
                'source'     => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
                'label'      => 'Use store positions',
                'global'     => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
                'required'   => true,
                'default'    => 0,
                'visible'    => true,
                'note'       => "Use store positions.",
                'sort_order' => 220,
                'group'      => 'General Information',
            ]
        );

        // Mandatory to ensure next installers will have proper EAV Attributes definitions.
        $this->eavConfig->clear();
    }
public function addUseStorePositionsAttribute(\Magento\Eav\Setup\EavSetup $eavSetup)
    {
        $eavSetup->addAttribute(
            Category::ENTITY,
            'use_store_positions',
            [
                'type'       => 'int',
                'input'      => 'select',
                'source'     => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
                'label'      => 'Use store positions',
                'global'     => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
                'required'   => true,
                'default'    => 0,
                'visible'    => true,
                'note'       => "Use store positions.",
                'sort_order' => 220,
                'group'      => 'General Information',
            ]
        );

        // Mandatory to ensure next installers will have proper EAV Attributes definitions.
        $this->eavConfig->clear();
    }
public function addUseStorePositionsAttribute ( \ Magento \ Eav \ Setup \ EavSetup $ eavSetup ) { $ eavSetup -> addAttribute ( Category :: ENTITY , 'use_store_positions' , [ 'type' => 'int' , 'input' => 'select' , 'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean' , 'label' => 'Use store positions' , 'global' => \ Magento \ Eav \ Model \ Entity \ Attribute \ ScopedAttributeInterface :: SCOPE_STORE , 'required' => true , 'default' => 0 , 'visible' => true , 'note' => "Use store positions." , 'sort_order' => 220 , 'group' => 'General Information' , ] ) ; // Mandatory to ensure next installers will have proper EAV Attributes definitions. $ this -> eavConfig -> clear ( ) ; }
Add the attribute handling the per-store merchandiser

@param \Magento\Eav\Setup\EavSetup $eavSetup EAV Setup

@return void
Add the attribute handling the per - store merchandiser