Skip to content

Commit

Permalink
Merge pull request #90 from magento-api/develop
Browse files Browse the repository at this point in the history
[API] Sprint 42
  • Loading branch information
Alexander Paliarush committed Feb 13, 2015
2 parents 381e1c6 + 63ef782 commit 765f195
Show file tree
Hide file tree
Showing 1,179 changed files with 4,519 additions and 3,874 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Baseurl implements \Magento\Framework\Notification\MessageInterface
protected $_config;

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

Expand All @@ -32,13 +32,13 @@ class Baseurl implements \Magento\Framework\Notification\MessageInterface

/**
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Framework\Store\StoreManagerInterface $storeManager
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\UrlInterface $urlBuilder
* @param \Magento\Framework\App\Config\ValueFactory $configValueFactory
*/
public function __construct(
\Magento\Framework\App\Config\ScopeConfigInterface $config,
\Magento\Framework\Store\StoreManagerInterface $storeManager,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\UrlInterface $urlBuilder,
\Magento\Framework\App\Config\ValueFactory $configValueFactory
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function getIdentity()
public function isDisplayed()
{
return $this->_authorization->isAllowed(
'Magento_Adminhtml::cache'
'Magento_Backend::cache'
) && count(
$this->_getCacheTypesForRefresh()
) > 0;
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/AdminNotification/etc/acl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Adminhtml::admin">
<resource id="Magento_Adminhtml::system">
<resource id="Magento_Adminhtml::system_other_settings">
<resource id="Magento_Backend::admin">
<resource id="Magento_Backend::system">
<resource id="Magento_Backend::system_other_settings">
<resource id="Magento_AdminNotification::adminnotification" title="Notifications" sortOrder="10">
<resource id="Magento_AdminNotification::show_toolbar" title="Show Toolbar" sortOrder="10" />
<resource id="Magento_AdminNotification::show_list" title="Show List" sortOrder="20" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
<router id="admin">
<route id="adminhtml">
<module name="Magento_AdminNotification" before="Magento_Adminhtml" />
<module name="Magento_AdminNotification" before="Magento_Backend" />
</route>
</router>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<head>
<css src="Magento_Core::prototype/magento.css"/>
<css src="Magento_Theme::prototype/magento.css"/>
</head>
<body>
<referenceContainer name="notifications">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
$this->createRules()->setData(
[
'role_id' => $admGroupRole->getId(),
'resource_id' => 'Magento_Adminhtml::all',
'resource_id' => 'Magento_Backend::all',
'privileges' => null,
'permission' => 'allow',
]
)->save();
} else {
/** @var \Magento\Authorization\Model\Rules $rule */
foreach ($rulesCollection as $rule) {
$rule->setData('resource_id', 'Magento_Adminhtml::all')->save();
$rule->setData('resource_id', 'Magento_Backend::all')->save();
}
}
4 changes: 2 additions & 2 deletions app/code/Magento/Backend/App/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ 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\Framework\Store\StoreManagerInterface $storeManager
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo
* @param string $routerId
Expand All @@ -70,7 +70,7 @@ public function __construct(
\Magento\Framework\App\ResponseFactory $responseFactory,
\Magento\Framework\App\Route\ConfigInterface $routeConfig,
\Magento\Framework\UrlInterface $url,
\Magento\Framework\Store\StoreManagerInterface $storeManager,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo,
$routerId,
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Block/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected function _prepareLayout()

$this->addChild('sales', 'Magento\Backend\Block\Dashboard\Sales');

if ($this->_scopeConfig->getValue(self::XML_PATH_ENABLE_CHARTS, \Magento\Framework\Store\ScopeInterface::SCOPE_STORE)) {
if ($this->_scopeConfig->getValue(self::XML_PATH_ENABLE_CHARTS, \Magento\Store\Model\ScopeInterface::SCOPE_STORE)) {
$block = $this->getLayout()->createBlock('Magento\Backend\Block\Dashboard\Diagrams');
} else {
$block = $this->getLayout()->createBlock(
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Block/Dashboard/Graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function getChartUrl($directUrl = true)

$timezoneLocal = $this->_scopeConfig->getValue(
$this->_localeDate->getDefaultTimezonePath(),
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
);

list($dateStart, $dateEnd) = $this->_collectionFactory->create()->getDateRange(
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Block/Page/Header.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ public function getLogoutLink()
*/
public function displayNoscriptNotice()
{
return $this->_scopeConfig->getValue('web/browser_capabilities/javascript', \Magento\Framework\Store\ScopeInterface::SCOPE_STORE);
return $this->_scopeConfig->getValue('web/browser_capabilities/javascript', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
}
}
4 changes: 2 additions & 2 deletions app/code/Magento/Backend/Block/Page/Notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Notices extends \Magento\Backend\Block\Template
*/
public function displayNoscriptNotice()
{
return $this->_scopeConfig->getValue('web/browser_capabilities/javascript', \Magento\Framework\Store\ScopeInterface::SCOPE_STORE);
return $this->_scopeConfig->getValue('web/browser_capabilities/javascript', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
}

/**
Expand All @@ -32,6 +32,6 @@ public function displayNoscriptNotice()
*/
public function displayDemoNotice()
{
return $this->_scopeConfig->getValue('design/head/demonotice', \Magento\Framework\Store\ScopeInterface::SCOPE_STORE);
return $this->_scopeConfig->getValue('design/head/demonotice', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele
sort($modules);

foreach ($modules as $moduleName) {
if ($moduleName === 'Magento_Adminhtml' || $moduleName === 'Magento_Backend') {
if ($moduleName === 'Magento_Backend') {
continue;
}
$html .= $this->_getFieldHtml($element, $moduleName);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Block/System/Store/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Store extends \Magento\Backend\Block\Widget\Grid\Container
/**
* @var string
*/
protected $_blockGroup = 'Magento_Adminhtml';
protected $_blockGroup = 'Magento_Backend';

/**
* @return void
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Block/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function isOutputEnabled($moduleName = null)

return !$this->_scopeConfig->isSetFlag(
'advanced/modules_disable_output/' . $moduleName,
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
);
}

Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Backend/Block/Template/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Context extends \Magento\Framework\View\Element\Template\Context
* @param \Magento\Framework\View\FileSystem $viewFileSystem
* @param \Magento\Framework\View\TemplateEnginePool $enginePool
* @param \Magento\Framework\App\State $appState
* @param \Magento\Framework\Store\StoreManagerInterface $storeManager
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\View\Page\Config $pageConfig
* @param \Magento\Framework\AuthorizationInterface $authorization
* @param \Magento\Backend\Model\Session $backendSession
Expand Down Expand Up @@ -99,7 +99,7 @@ public function __construct(
\Magento\Framework\View\FileSystem $viewFileSystem,
\Magento\Framework\View\TemplateEnginePool $enginePool,
\Magento\Framework\App\State $appState,
\Magento\Framework\Store\StoreManagerInterface $storeManager,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\View\Page\Config $pageConfig,
\Magento\Framework\AuthorizationInterface $authorization,
\Magento\Backend\Model\Session $backendSession,
Expand Down Expand Up @@ -143,7 +143,7 @@ public function __construct(
/**
* Get store manager
*
* @return \Magento\Framework\Store\StoreManagerInterface
* @return \Magento\Store\Model\StoreManagerInterface
*/
public function getStoreManager()
{
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Backend/Block/Widget/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Context extends \Magento\Backend\Block\Template\Context
* @param \Magento\Framework\View\FileSystem $viewFileSystem
* @param \Magento\Framework\View\TemplateEnginePool $enginePool
* @param \Magento\Framework\App\State $appState
* @param \Magento\Framework\Store\StoreManagerInterface $storeManager
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\AuthorizationInterface $authorization
* @param \Magento\Backend\Model\Session $backendSession
* @param \Magento\Framework\Math\Random $mathRandom
Expand Down Expand Up @@ -84,7 +84,7 @@ public function __construct(
\Magento\Framework\View\FileSystem $viewFileSystem,
\Magento\Framework\View\TemplateEnginePool $enginePool,
\Magento\Framework\App\State $appState,
\Magento\Framework\Store\StoreManagerInterface $storeManager,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\View\Page\Config $pageConfig,
\Magento\Framework\AuthorizationInterface $authorization,
\Magento\Backend\Model\Session $backendSession,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ protected function _convertDate($date, $locale)
$dateObj->setTimezone(
$this->_scopeConfig->getValue(
$this->_localeDate->getDefaultTimezonePath(),
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function getValue($index = null)
$datetimeTo->setTimezone(
$this->_scopeConfig->getValue(
$this->_localeDate->getDefaultTimezonePath(),
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
)
);
$datetimeTo->addDay(1)->subSecond(1);
Expand All @@ -70,7 +70,7 @@ protected function _convertDate($date, $locale)
$dateObj->setTimezone(
$this->_scopeConfig->getValue(
$this->_localeDate->getDefaultTimezonePath(),
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Currency extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstra
/**
* Application object
*
* @var \Magento\Framework\Store\StoreManagerInterface
* @var \Magento\Store\Model\StoreManagerInterface
*/
protected $_storeManager;

Expand All @@ -51,15 +51,15 @@ class Currency extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstra

/**
* @param \Magento\Backend\Block\Context $context
* @param \Magento\Framework\Store\StoreManagerInterface $storeManager
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Directory\Model\Currency\DefaultLocator $currencyLocator
* @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
* @param \Magento\Framework\Locale\CurrencyInterface $localeCurrency
* @param array $data
*/
public function __construct(
\Magento\Backend\Block\Context $context,
\Magento\Framework\Store\StoreManagerInterface $storeManager,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Directory\Model\Currency\DefaultLocator $currencyLocator,
\Magento\Directory\Model\CurrencyFactory $currencyFactory,
\Magento\Framework\Locale\CurrencyInterface $localeCurrency,
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Controller/Adminhtml/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ protected function _validateTypes(array $types)
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::cache');
return $this->_authorization->isAllowed('Magento_Backend::cache');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ class Dashboard extends \Magento\Backend\App\Action
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::dashboard');
return $this->_authorization->isAllowed('Magento_Backend::dashboard');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function execute()
{
$items = [];

if (!$this->_authorization->isAllowed('Magento_Adminhtml::global_search')) {
if (!$this->_authorization->isAllowed('Magento_Backend::global_search')) {
$items[] = [
'id' => 'error',
'type' => __('Error'),
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backend/Controller/Adminhtml/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class System extends AbstractAction
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::system');
return $this->_authorization->isAllowed('Magento_Backend::system');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request)
protected function _isAllowed()
{
$sectionId = $this->_request->getParam('section');
return $this->_authorization->isAllowed('Magento_Adminhtml::config')
return $this->_authorization->isAllowed('Magento_Backend::config')
|| $this->_configStructure->getElement($sectionId)->isAllowed();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class Account extends Action
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::myaccount');
return $this->_authorization->isAllowed('Magento_Backend::myaccount');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ public function __construct(
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::design');
return $this->_authorization->isAllowed('Magento_Backend::design');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function execute()
{
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
$resultPage = $this->resultPageFactory->create();
$resultPage->setActiveMenu('Magento_Adminhtml::system');
$resultPage->setActiveMenu('Magento_Backend::system');
$resultPage->addBreadcrumb(__('System'), __('System'));
return $resultPage;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected function createPage()
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::store');
return $this->_authorization->isAllowed('Magento_Backend::store');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ protected function _initVariable()
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Adminhtml::variable');
return $this->_authorization->isAllowed('Magento_Backend::variable');
}
}
4 changes: 2 additions & 2 deletions app/code/Magento/Backend/Helper/Dashboard/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Data extends \Magento\Core\Helper\Data
/**
* @param \Magento\Framework\App\Helper\Context $context
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\Store\StoreManagerInterface $storeManager
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\App\State $appState
* @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
* @param DeploymentConfig $deploymentConfig
Expand All @@ -39,7 +39,7 @@ class Data extends \Magento\Core\Helper\Data
public function __construct(
\Magento\Framework\App\Helper\Context $context,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Framework\Store\StoreManagerInterface $storeManager,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\App\State $appState,
\Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency,
DeploymentConfig $deploymentConfig,
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Backend/Helper/Dashboard/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Order extends \Magento\Backend\Helper\Dashboard\AbstractDashboard
/**
* @param \Magento\Framework\App\Helper\Context $context
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\Store\StoreManagerInterface $storeManager
* @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
Expand All @@ -27,7 +27,7 @@ class Order extends \Magento\Backend\Helper\Dashboard\AbstractDashboard
public function __construct(
\Magento\Framework\App\Helper\Context $context,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Framework\Store\StoreManagerInterface $storeManager,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\App\State $appState,
\Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency,
\Magento\Reports\Model\Resource\Order\Collection $orderCollection,
Expand Down
Loading

0 comments on commit 765f195

Please sign in to comment.