Skip to content

Commit

Permalink
Merge pull request #56 from magento-extensibility/develop
Browse files Browse the repository at this point in the history
[Extensibility] bug fixes
  • Loading branch information
He, Joan(johe) committed Oct 29, 2015
2 parents 550f10e + c9b1de3 commit ec5598b
Show file tree
Hide file tree
Showing 173 changed files with 1,717 additions and 857 deletions.

This file was deleted.

94 changes: 0 additions & 94 deletions app/code/Magento/Backend/Block/Page/Locale.php

This file was deleted.

21 changes: 12 additions & 9 deletions app/code/Magento/Backend/view/adminhtml/layout/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,18 @@
<block class="Magento\Framework\View\Element\Template" name="page.actions.toolbar" template="Magento_Backend::pageactions.phtml" after="-"/>
</referenceContainer>
<referenceContainer name="footer">
<block class="Magento\Backend\Block\Page\Locale" name="locale.switcher" template="Magento_Backend::page/locale.phtml"/>
<container name="legal" htmlTag="div" htmlClass="footer-legal col-m-6 col-m-offset-1">
<block class="Magento\Backend\Block\Page\Footer" name="version" as="version" />
<block class="Magento\Backend\Block\Page\Copyright" name="copyright" as="copyright" />
<block class="Magento\Framework\View\Element\Template" name="report" as="report" template="Magento_Backend::page/report.phtml">
<arguments>
<argument name="bugreport_url" xsi:type="string">https://github.com/magento/magento2/issues</argument>
</arguments>
</block>
<container name="legal" htmlTag="div" htmlClass="footer-legal">
<container name="legal.copyright" htmlTag="p" htmlClass="copyright col-m-6">
<block class="Magento\Backend\Block\Page\Copyright" name="copyright" as="copyright" />
</container>
<container name="legal.system" htmlTag="div" htmlClass="footer-legal-system col-m-6">
<block class="Magento\Backend\Block\Page\Footer" name="version" as="version" />
<block class="Magento\Framework\View\Element\Template" name="report" as="report" template="Magento_Backend::page/report.phtml">
<arguments>
<argument name="bugreport_url" xsi:type="string">https://github.com/magento/magento2/issues</argument>
</arguments>
</block>
</container>
</container>
</referenceContainer>
<referenceContainer name="backend.page">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@
// @codingStandardsIgnoreFile

?>
<p class="copyright">
<a class="link-copyright" href="http://magento.com" target="_blank" title="<?php /* @escapeNotVerified */ echo __('Magento') ?>"></a>
<?php /* @escapeNotVerified */ echo __('Copyright &copy; %1 Magento. All rights reserved.', date('Y')) ?>
</p>
<a class="link-copyright" href="http://magento.com" target="_blank" title="<?php /* @escapeNotVerified */ echo __('Magento') ?>"></a>
<?php /* @escapeNotVerified */ echo __('Copyright &copy; %1 Magento. All rights reserved.', date('Y')) ?>

This file was deleted.

7 changes: 5 additions & 2 deletions app/code/Magento/Backup/Model/Config/Backend/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Cron extends \Magento\Framework\App\Config\Value
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
* @param \Magento\Framework\App\Config\ValueFactory $configValueFactory
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
Expand All @@ -42,6 +43,7 @@ public function __construct(
\Magento\Framework\Model\Context $context,
\Magento\Framework\Registry $registry,
\Magento\Framework\App\Config\ScopeConfigInterface $config,
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
\Magento\Framework\App\Config\ValueFactory $configValueFactory,
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
Expand All @@ -50,13 +52,13 @@ public function __construct(
) {
$this->_runModelPath = $runModelPath;
$this->_configValueFactory = $configValueFactory;
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
}

/**
* Cron settings after save
*
* @return void
* @return $this
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function afterSave()
Expand Down Expand Up @@ -102,5 +104,6 @@ public function afterSave()
} catch (\Exception $e) {
throw new \Magento\Framework\Exception\LocalizedException(__('We can\'t save the Cron expression.'));
}
return parent::afterSave();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Countrycreditcard extends \Magento\Framework\App\Config\Value
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
* @param \Magento\Framework\Math\Random $mathRandom
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
Expand All @@ -25,13 +26,14 @@ public function __construct(
\Magento\Framework\Model\Context $context,
\Magento\Framework\Registry $registry,
\Magento\Framework\App\Config\ScopeConfigInterface $config,
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
\Magento\Framework\Math\Random $mathRandom,
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
array $data = []
) {
$this->mathRandom = $mathRandom;
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
}

/**
Expand Down
10 changes: 5 additions & 5 deletions app/code/Magento/Bundle/Setup/InstallData.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
'input' => '',
'class' => '',
'source' => '',
'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL,
'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
'visible' => true,
'required' => true,
'user_defined' => false,
Expand All @@ -112,7 +112,7 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
'input' => '',
'class' => '',
'source' => '',
'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL,
'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
'visible' => false,
'required' => true,
'user_defined' => false,
Expand All @@ -137,7 +137,7 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
'input' => '',
'class' => '',
'source' => '',
'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL,
'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
'visible' => false,
'required' => true,
'user_defined' => false,
Expand All @@ -164,7 +164,7 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
'input' => 'select',
'class' => '',
'source' => 'Magento\Bundle\Model\Product\Attribute\Source\Price\View',
'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL,
'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
'visible' => true,
'required' => true,
'user_defined' => false,
Expand All @@ -190,7 +190,7 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
'input' => '',
'class' => '',
'source' => '',
'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL,
'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
'visible' => false,
'required' => true,
'user_defined' => false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ protected function _prepareForm()
}

$scopes = [
\Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_STORE => __('Store View'),
\Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_WEBSITE => __('Website'),
\Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL => __('Global'),
\Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE => __('Store View'),
\Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_WEBSITE => __('Website'),
\Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL => __('Global'),
];

if ($attributeObject->getAttributeCode() == 'status' || $attributeObject->getAttributeCode() == 'tax_class_id'
) {
unset($scopes[\Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_STORE]);
unset($scopes[\Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE]);
}

$fieldset->addField(
Expand Down
Loading

0 comments on commit ec5598b

Please sign in to comment.