Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /** * Copyright Magento, Inc. All rights reserved. * See COPYING.txt for license ..
Decoded Output download
<?php
/**
* Copyright Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @author Magento Core Team <[email protected]>
*/
namespace Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Toolbar\Main;
use Magento\Backend\Block\Widget\Form;
class Filter extends \Magento\Backend\Block\Widget\Form\Generic
{
/**
* @var \Magento\Eav\Model\Entity\Attribute\SetFactory
*/
protected $_setFactory;
/**
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Data\FormFactory $formFactory
* @param \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory
* @param array $data
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Framework\Registry $registry,
\Magento\Framework\Data\FormFactory $formFactory,
\Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory,
array $data = []
) {
$this->_setFactory = $setFactory;
parent::__construct($context, $registry, $formFactory, $data);
}
/**
* @return void
*/
protected function _prepareForm()
{
/** @var \Magento\Framework\Data\Form $form */
$form = $this->_formFactory->create();
$collection = $this->_setFactory->create()->getResourceCollection()->load()->toOptionArray();
$form->addField(
'set_switcher',
'select',
[
'name' => 'set_switcher',
'required' => true,
'class' => 'left-col-block',
'no_span' => true,
'values' => $collection,
'onchange' => 'this.form.submit()'
]
);
$form->setUseContainer(true);
$form->setMethod('post');
$this->setForm($form);
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* Copyright Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @author Magento Core Team <[email protected]>
*/
namespace Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Toolbar\Main;
use Magento\Backend\Block\Widget\Form;
class Filter extends \Magento\Backend\Block\Widget\Form\Generic
{
/**
* @var \Magento\Eav\Model\Entity\Attribute\SetFactory
*/
protected $_setFactory;
/**
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Data\FormFactory $formFactory
* @param \Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory
* @param array $data
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Framework\Registry $registry,
\Magento\Framework\Data\FormFactory $formFactory,
\Magento\Eav\Model\Entity\Attribute\SetFactory $setFactory,
array $data = []
) {
$this->_setFactory = $setFactory;
parent::__construct($context, $registry, $formFactory, $data);
}
/**
* @return void
*/
protected function _prepareForm()
{
/** @var \Magento\Framework\Data\Form $form */
$form = $this->_formFactory->create();
$collection = $this->_setFactory->create()->getResourceCollection()->load()->toOptionArray();
$form->addField(
'set_switcher',
'select',
[
'name' => 'set_switcher',
'required' => true,
'class' => 'left-col-block',
'no_span' => true,
'values' => $collection,
'onchange' => 'this.form.submit()'
]
);
$form->setUseContainer(true);
$form->setMethod('post');
$this->setForm($form);
}
}
Function Calls
| None |
Stats
| MD5 | d38c2fc7640f125374ac6d4aeae85a4b |
| Eval Count | 0 |
| Decode Time | 92 ms |