31 parent::__construct($context);
41 public function getAddNewAttributeButton($dataProvider =
'')
44 $attributeCreate = $this->
getLayout()->createBlock(
45 \
Magento\Backend\Block\Widget\Button::class
47 if ($attributeCreate->getAuthorization()->isAllowed(
'Magento_Catalog::attributes_attributes')) {
48 $attributeCreate->setDataAttribute(
51 'productAttributes' => [
52 'dataProvider' => $dataProvider,
53 'url' => $this->
getUrl(
'catalog/product_attribute/new', [
54 'store' => $this->coreRegistry->registry(
'current_product')->getStoreId(),
55 'product_tab' =>
'variations',
60 'frontend_input' =>
'select',
70 __(
'Create New Attribute')
72 return $attributeCreate->toHtml();
83 return __(
'Select Attributes');
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\Registry $registry)
getUrl($route='', $params=[])