Skip to content

Commit

Permalink
Merge pull request #97 from magento-extensibility/develop
Browse files Browse the repository at this point in the history
[Extensibility] Sprint 45 CE
  • Loading branch information
Joan He committed Feb 18, 2015
2 parents 3941c63 + b11a447 commit 76d3d79
Show file tree
Hide file tree
Showing 224 changed files with 2,054 additions and 2,298 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

namespace Magento\AdminNotification\Model\System\Message;

use Magento\Store\Model\Store;

class Baseurl implements \Magento\Framework\Notification\MessageInterface
{
/**
Expand Down Expand Up @@ -56,9 +58,9 @@ public function __construct(
protected function _getConfigUrl()
{
$output = '';
$defaultUnsecure = $this->_config->getValue(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_URL, 'default');
$defaultUnsecure = $this->_config->getValue(Store::XML_PATH_UNSECURE_BASE_URL, 'default');

$defaultSecure = $this->_config->getValue(\Magento\Store\Model\Store::XML_PATH_SECURE_BASE_URL, 'default');
$defaultSecure = $this->_config->getValue(Store::XML_PATH_SECURE_BASE_URL, 'default');

if ($defaultSecure == \Magento\Store\Model\Store::BASE_URL_PLACEHOLDER ||
$defaultUnsecure == \Magento\Store\Model\Store::BASE_URL_PLACEHOLDER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

namespace Magento\AdminNotification\Model\System\Message;

use Magento\Store\Model\Store;

class Security implements \Magento\Framework\Notification\MessageInterface
{
/**
Expand Down Expand Up @@ -93,7 +95,7 @@ private function _canShowNotification()
*/
private function _isFileAccessible()
{
$unsecureBaseURL = $this->_config->getValue(\Magento\Store\Model\Store::XML_PATH_UNSECURE_BASE_URL, 'default');
$unsecureBaseURL = $this->_config->getValue(Store::XML_PATH_UNSECURE_BASE_URL, 'default');

/** @var $http \Magento\Framework\HTTP\Adapter\Curl */
$http = $this->_curlFactory->create();
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/App/AbstractAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ abstract class AbstractAction extends \Magento\Framework\App\Action\Action
protected $_canUseBaseUrl;

/**
* @var \Magento\Core\App\Action\FormKeyValidator
* @var \Magento\Framework\Data\Form\FormKey\Validator
*/
protected $_formKeyValidator;

Expand Down
8 changes: 4 additions & 4 deletions app/code/Magento/Backend/App/Action/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Context extends \Magento\Framework\App\Action\Context
protected $_backendUrl;

/**
* @var \Magento\Core\App\Action\FormKeyValidator
* @var \Magento\Framework\Data\Form\FormKey\Validator
*/
protected $_formKeyValidator;

Expand Down Expand Up @@ -66,7 +66,7 @@ class Context extends \Magento\Framework\App\Action\Context
* @param \Magento\Backend\Model\Auth $auth
* @param \Magento\Backend\Helper\Data $helper
* @param \Magento\Backend\Model\UrlInterface $backendUrl
* @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator
* @param \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator
* @param \Magento\Framework\Locale\ResolverInterface $localeResolver
* @param bool $canUseBaseUrl
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
Expand All @@ -86,7 +86,7 @@ public function __construct(
\Magento\Backend\Model\Auth $auth,
\Magento\Backend\Helper\Data $helper,
\Magento\Backend\Model\UrlInterface $backendUrl,
\Magento\Core\App\Action\FormKeyValidator $formKeyValidator,
\Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator,
\Magento\Framework\Locale\ResolverInterface $localeResolver,
$canUseBaseUrl = false
) {
Expand Down Expand Up @@ -146,7 +146,7 @@ public function getCanUseBaseUrl()
}

/**
* @return \Magento\Core\App\Action\FormKeyValidator
* @return \Magento\Framework\Data\Form\FormKey\Validator
*/
public function getFormKeyValidator()
{
Expand Down
16 changes: 5 additions & 11 deletions app/code/Magento/Backend/App/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
namespace Magento\Backend\App;

class Router extends \Magento\Core\App\Router\Base
class Router extends \Magento\Framework\App\Router\Base
{
/**
* @var \Magento\Backend\App\ConfigInterface
Expand Down Expand Up @@ -53,11 +53,9 @@ class Router extends \Magento\Core\App\Router\Base
* @param \Magento\Framework\App\ResponseFactory $responseFactory
* @param \Magento\Framework\App\Route\ConfigInterface $routeConfig
* @param \Magento\Framework\UrlInterface $url
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo
* @param string $routerId
* @param \Magento\Framework\Code\NameBuilder $nameBuilder
* @param \Magento\Framework\App\Router\PathConfigInterface $pathConfig
* @param \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig
* @param \Magento\Backend\App\ConfigInterface $backendConfig
*
Expand All @@ -70,11 +68,9 @@ public function __construct(
\Magento\Framework\App\ResponseFactory $responseFactory,
\Magento\Framework\App\Route\ConfigInterface $routeConfig,
\Magento\Framework\UrlInterface $url,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo,
$routerId,
\Magento\Framework\Code\NameBuilder $nameBuilder,
\Magento\Framework\App\Router\PathConfigInterface $pathConfig,
\Magento\Framework\App\Config\ScopeConfigInterface $coreConfig,
\Magento\Backend\App\ConfigInterface $backendConfig
) {
Expand All @@ -85,11 +81,9 @@ public function __construct(
$responseFactory,
$routeConfig,
$url,
$storeManager,
$scopeConfig,
$urlSecurityInfo,
$routerId,
$nameBuilder
$nameBuilder,
$pathConfig
);
$this->_coreConfig = $coreConfig;
$this->_backendConfig = $backendConfig;
Expand Down
12 changes: 6 additions & 6 deletions app/code/Magento/Backend/Block/System/Cache/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@
class Form extends \Magento\Backend\Block\Widget\Form\Generic
{
/**
* @var \Magento\Core\Helper\Data
* @var \Magento\Framework\App\Cache\TypeListInterface
*/
protected $_coreData;
protected $cacheTypeList;

/**
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Data\FormFactory $formFactory
* @param \Magento\Core\Helper\Data $coreData
* @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
* @param array $data
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Framework\Registry $registry,
\Magento\Framework\Data\FormFactory $formFactory,
\Magento\Core\Helper\Data $coreData,
\Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
array $data = []
) {
$this->_coreData = $coreData;
$this->cacheTypeList = $cacheTypeList;
parent::__construct($context, $registry, $formFactory, $data);
}

Expand Down Expand Up @@ -63,7 +63,7 @@ public function initForm()
]
);

foreach ($this->_coreData->getCacheTypes() as $type => $label) {
foreach ($this->cacheTypeList->getTypeLabels() as $type => $label) {
$fieldset->addField(
'enable_' . $type,
'checkbox',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
*/
namespace Magento\Backend\Helper\Dashboard;

use Magento\Core\Helper\Data as HelperData;

/**
* Adminhtml abstract dashboard helper.
*/
abstract class AbstractDashboard extends HelperData
abstract class AbstractDashboard extends \Magento\Framework\App\Helper\AbstractHelper
{
/**
* Helper collection
Expand Down
25 changes: 9 additions & 16 deletions app/code/Magento/Backend/Helper/Dashboard/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Data helper for dashboard
*/
class Data extends \Magento\Core\Helper\Data
class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
/**
* @var \Magento\Framework\Data\Collection\Db
Expand All @@ -27,33 +27,26 @@ class Data extends \Magento\Core\Helper\Data
*/
const INSTALL_DATE = 'install/date';

/**
* @var \Magento\Store\Model\StoreManagerInterface
*/
private $_storeManager;

/**
* @param \Magento\Framework\App\Helper\Context $context
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\App\State $appState
* @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
* @param DeploymentConfig $deploymentConfig
* @param bool $dbCompatibleMode
*/
public function __construct(
\Magento\Framework\App\Helper\Context $context,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\App\State $appState,
\Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency,
DeploymentConfig $deploymentConfig,
$dbCompatibleMode = true
DeploymentConfig $deploymentConfig
) {
parent::__construct(
$context,
$scopeConfig,
$storeManager,
$appState,
$priceCurrency,
$dbCompatibleMode
$context
);
$this->_installDate = $deploymentConfig->get(self::INSTALL_DATE);
$this->_storeManager = $storeManager;
}

/**
Expand Down
19 changes: 2 additions & 17 deletions app/code/Magento/Backend/Helper/Dashboard/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,15 @@ class Order extends \Magento\Backend\Helper\Dashboard\AbstractDashboard

/**
* @param \Magento\Framework\App\Helper\Context $context
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\App\State $appState
* @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
* @param \Magento\Reports\Model\Resource\Order\Collection $orderCollection
* @param bool $dbCompatibleMode
*/
public function __construct(
\Magento\Framework\App\Helper\Context $context,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\App\State $appState,
\Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency,
\Magento\Reports\Model\Resource\Order\Collection $orderCollection,
$dbCompatibleMode = true
\Magento\Reports\Model\Resource\Order\Collection $orderCollection
) {
$this->_orderCollection = $orderCollection;
parent::__construct(
$context,
$scopeConfig,
$storeManager,
$appState,
$priceCurrency,
$dbCompatibleMode
$context
);
}

Expand Down
22 changes: 12 additions & 10 deletions app/code/Magento/Backend/Model/Translate/Inline/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,38 @@ class Config implements \Magento\Framework\Translate\Inline\ConfigInterface
/**
* @var \Magento\Backend\App\ConfigInterface
*/
protected $_config;
protected $config;

/**
* @var \Magento\Core\Helper\Data
* @var \Magento\Developer\Helper\Data
*/
protected $_helper;
protected $devHelper;

/**
* @param \Magento\Backend\App\ConfigInterface $config
* @param \Magento\Core\Helper\Data $helper
* @param \Magento\Developer\Helper\Data $devHelper
*/
public function __construct(\Magento\Backend\App\ConfigInterface $config, \Magento\Core\Helper\Data $helper)
{
$this->_config = $config;
$this->_helper = $helper;
public function __construct(
\Magento\Backend\App\ConfigInterface $config,
\Magento\Developer\Helper\Data $devHelper
) {
$this->config = $config;
$this->devHelper = $devHelper;
}

/**
* {@inheritdoc}
*/
public function isActive($scope = null)
{
return $this->_config->isSetFlag('dev/translate_inline/active_admin');
return $this->config->isSetFlag('dev/translate_inline/active_admin');
}

/**
* {@inheritdoc}
*/
public function isDevAllowed($scope = null)
{
return $this->_helper->isDevAllowed($scope);
return $this->devHelper->isDevAllowed($scope);
}
}
1 change: 1 addition & 0 deletions app/code/Magento/Backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"magento/module-store": "0.42.0-beta8",
"magento/module-directory": "0.42.0-beta8",
"magento/module-core": "0.42.0-beta8",
"magento/module-developer": "0.42.0-beta8",
"magento/module-eav": "0.42.0-beta8",
"magento/module-cron": "0.42.0-beta8",
"magento/module-theme": "0.42.0-beta8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

namespace Magento\Bundle\Block\Catalog\Product\View\Type\Bundle;

use Magento\Bundle\Model\Product\Price;

/**
* Bundle option renderer
*/
Expand All @@ -30,9 +28,9 @@ class Option extends \Magento\Bundle\Block\Catalog\Product\Price
protected $_showSingle;

/**
* @var \Magento\Core\Helper\Data
* @var \Magento\Framework\Pricing\Helper\Data
*/
protected $_coreHelper;
protected $pricingHelper;

/**
* @var \Magento\Tax\Helper\Data
Expand All @@ -53,7 +51,7 @@ class Option extends \Magento\Bundle\Block\Catalog\Product\Price
* @param \Magento\Framework\Math\Random $mathRandom
* @param \Magento\Checkout\Helper\Cart $cartHelper
* @param \Magento\Tax\Helper\Data $taxData
* @param \Magento\Core\Helper\Data $coreHelper
* @param \Magento\Framework\Pricing\Helper\Data $pricingHelper
* @param array $data
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
Expand All @@ -67,10 +65,10 @@ public function __construct(
\Magento\Framework\Math\Random $mathRandom,
\Magento\Checkout\Helper\Cart $cartHelper,
\Magento\Tax\Helper\Data $taxData,
\Magento\Core\Helper\Data $coreHelper,
\Magento\Framework\Pricing\Helper\Data $pricingHelper,
array $data = []
) {
$this->_coreHelper = $coreHelper;
$this->pricingHelper = $pricingHelper;
$this->_catalogHelper = $catalogData;
$this->_taxHelper = $taxData;
parent::__construct(
Expand Down Expand Up @@ -248,7 +246,7 @@ public function getSelectionPrice($selection)
1
);
if (is_numeric($price)) {
$price = $this->_coreHelper->currencyByStore($price, $store, false);
$price = $this->pricingHelper->currencyByStore($price, $store, false);
}
}
return is_numeric($price) ? $price : 0;
Expand Down
Loading

0 comments on commit 76d3d79

Please sign in to comment.