Пример #1
0
 /**
  * @param \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes $subject
  * @param \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes $result
  * @return \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes
  */
 public function afterSetForm(\Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes $subject, \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes $result)
 {
     $form = $subject->getForm();
     $field = $form->getElement('url_key');
     if ($field) {
         $field->setRenderer($subject->getLayout()->createBlock('Magento\\CatalogUrlRewrite\\Block\\UrlKeyRenderer'));
     }
     return $result;
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function getLayout()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getLayout');
     if (!$pluginInfo) {
         return parent::getLayout();
     } else {
         return $this->___callPlugins('getLayout', func_get_args(), $pluginInfo);
     }
 }