Skip to content

Commit

Permalink
phpcbf
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel committed Sep 19, 2024
1 parent cd41653 commit 4cf4d00
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ public function getHeaderText()

public function getValidationUrl()
{
return $this->getUrl('*/*/validate', ['_current'=>true]);
return $this->getUrl('*/*/validate', ['_current' => true]);
}

public function getSaveUrl()
{
return $this->getUrl('*/*/save', ['_current'=>true, 'back'=>null]);
return $this->getUrl('*/*/save', ['_current' => true, 'back' => null]);
}

public function getHeaderCssClass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected function _prepareForm()

$response = new Varien_Object();
$response->setTypes([]);
Mage::dispatchEvent("adminhtml_{$attributeTypeCode}_attribute_types", ['response'=>$response]);
Mage::dispatchEvent("adminhtml_{$attributeTypeCode}_attribute_types", ['response' => $response]);
$_disabledTypes = [];
$_hiddenFields = [];
foreach ($response->getTypes() as $type) {
Expand All @@ -70,9 +70,9 @@ protected function _prepareForm()
$frontendInputElm->setValues($frontendInputValues);

$scopes = [
Mage_Eav_Model_Entity_Attribute::SCOPE_STORE =>Mage::helper('eav')->__('Store View'),
Mage_Eav_Model_Entity_Attribute::SCOPE_WEBSITE =>Mage::helper('eav')->__('Website'),
Mage_Eav_Model_Entity_Attribute::SCOPE_GLOBAL =>Mage::helper('eav')->__('Global'),
Mage_Eav_Model_Entity_Attribute::SCOPE_STORE => Mage::helper('eav')->__('Store View'),
Mage_Eav_Model_Entity_Attribute::SCOPE_WEBSITE => Mage::helper('eav')->__('Website'),
Mage_Eav_Model_Entity_Attribute::SCOPE_GLOBAL => Mage::helper('eav')->__('Global'),
];

if ($attributeObject->getAttributeCode() == 'status') {
Expand All @@ -82,14 +82,14 @@ protected function _prepareForm()
$response = new Varien_Object();
$response->setScopes($scopes);
$response->setAttribute($attributeObject);
Mage::dispatchEvent("adminhtml_{$attributeTypeCode}_attribute_scopes", ['response'=>$response]);
Mage::dispatchEvent("adminhtml_{$attributeTypeCode}_attribute_scopes", ['response' => $response]);

$fieldset->addField('is_global', 'select', [
'name' => 'is_global',
'label' => Mage::helper('eav')->__('Scope'),
'title' => Mage::helper('eav')->__('Scope'),
'note' => Mage::helper('eav')->__('Declare attribute value saving scope'),
'values'=> $response->getScopes(),
'values' => $response->getScopes(),
], 'attribute_code');

Mage::dispatchEvent("adminhtml_{$attributeTypeCode}_attribute_edit_prepare_form", [
Expand Down
12 changes: 6 additions & 6 deletions app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ protected function _prepareColumns()
parent::_prepareColumns();

$this->addColumn('is_global', [
'header'=>Mage::helper('eav')->__('Scope'),
'sortable'=>true,
'index'=>'is_global',
'header' => Mage::helper('eav')->__('Scope'),
'sortable' => true,
'index' => 'is_global',
'type' => 'options',
'options' => [
Mage_Eav_Model_Entity_Attribute::SCOPE_STORE =>Mage::helper('eav')->__('Store View'),
Mage_Eav_Model_Entity_Attribute::SCOPE_WEBSITE =>Mage::helper('eav')->__('Website'),
Mage_Eav_Model_Entity_Attribute::SCOPE_GLOBAL =>Mage::helper('eav')->__('Global'),
Mage_Eav_Model_Entity_Attribute::SCOPE_STORE => Mage::helper('eav')->__('Store View'),
Mage_Eav_Model_Entity_Attribute::SCOPE_WEBSITE => Mage::helper('eav')->__('Website'),
Mage_Eav_Model_Entity_Attribute::SCOPE_GLOBAL => Mage::helper('eav')->__('Global'),
],
'align' => 'center',
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ protected function _prepareColumns()

public function getRowUrl($row)
{
return $this->getUrl('*/*/edit', ['id'=>$row->getAttributeSetId()]);
return $this->getUrl('*/*/edit', ['id' => $row->getAttributeSetId()]);
}
}
14 changes: 7 additions & 7 deletions app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected function _prepareLayout()
'label' => Mage::helper('eav')->__('Delete Selected Group'),
'onclick' => 'editSet.submit();',
'class' => 'delete'
])
])
);

$this->setChild(
Expand All @@ -70,7 +70,7 @@ protected function _prepareLayout()
'label' => Mage::helper('eav')->__('Add New'),
'onclick' => 'editSet.addGroup();',
'class' => 'add'
])
])
);

$this->setChild(
Expand All @@ -79,15 +79,15 @@ protected function _prepareLayout()
'label' => Mage::helper('eav')->__('Back'),
'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')',
'class' => 'back'
])
])
);

$this->setChild(
'reset_button',
$this->getLayout()->createBlock('adminhtml/widget_button')->setData([
'label' => Mage::helper('eav')->__('Reset'),
'onclick' => 'window.location.reload()'
])
])
);

$this->setChild(
Expand All @@ -96,7 +96,7 @@ protected function _prepareLayout()
'label' => Mage::helper('eav')->__('Save Attribute Set'),
'onclick' => 'editSet.save();',
'class' => 'save'
])
])
);

if ($entity_type = Mage::registry('entity_type')) {
Expand All @@ -113,15 +113,15 @@ protected function _prepareLayout()
'label' => Mage::helper('eav')->__('Delete Attribute Set'),
'onclick' => 'deleteConfirm(\'' . $deleteConfirmMessage . '\', \'' . $deleteUrl . '\')',
'class' => 'delete'
])
])
);

$this->setChild(
'rename_button',
$this->getLayout()->createBlock('adminhtml/widget_button')->setData([
'label' => Mage::helper('eav')->__('New Set Name'),
'onclick' => 'editSet.rename()'
])
])
);

return parent::_prepareLayout();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function _prepareForm()
{
$form = new Varien_Data_Form();

$fieldset = $form->addFieldset('set_fieldset', ['legend'=>Mage::helper('eav')->__('Add New Attribute')]);
$fieldset = $form->addFieldset('set_fieldset', ['legend' => Mage::helper('eav')->__('Add New Attribute')]);

$fieldset->addField(
'new_attribute',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function _prepareForm()
{
$form = new Varien_Data_Form();

$fieldset = $form->addFieldset('set_fieldset', ['legend'=>Mage::helper('eav')->__('Add New Group')]);
$fieldset = $form->addFieldset('set_fieldset', ['legend' => Mage::helper('eav')->__('Add New Group')]);

$fieldset->addField(
'attribute_group_name',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function _prepareForm()
->load($this->getRequest()->getParam('id'));

$form = new Varien_Data_Form();
$fieldset = $form->addFieldset('set_name', ['legend'=> Mage::helper('eav')->__('Edit Set Name')]);
$fieldset = $form->addFieldset('set_name', ['legend' => Mage::helper('eav')->__('Edit Set Name')]);
$fieldset->addField('attribute_set_name', 'text', [
'label' => Mage::helper('eav')->__('Name'),
'note' => Mage::helper('eav')->__('For internal use.'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function _prepareLayout()
'label' => Mage::helper('eav')->__('Save Attribute Set'),
'onclick' => 'if (addSet.submit()) disableElements(\'save\');',
'class' => 'save'
])
])
);
$this->setChild(
'back_button',
Expand All @@ -50,7 +50,7 @@ protected function _prepareLayout()
'label' => Mage::helper('eav')->__('Back'),
'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')',
'class' => 'back'
])
])
);

$this->setChild(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
class Mage_Eav_Block_Adminhtml_Helper_Form_Boolean extends Varien_Data_Form_Element_Select
{
public function __construct($attributes=[])
public function __construct($attributes = [])
{
parent::__construct($attributes);
$this->setValues([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public function saveAction()
Mage::app()->cleanCache([Mage_Core_Model_Translate::CACHE_TAG]);
$session->setAttributeData(false);
if ($redirectBack) {
$this->_redirect('*/*/edit', ['attribute_id' => $model->getId(),'_current'=>true]);
$this->_redirect('*/*/edit', ['attribute_id' => $model->getId(),'_current' => true]);
} else {
$this->_redirect('*/*/', []);
}
Expand Down

0 comments on commit 4cf4d00

Please # to comment.