-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from magento-south/MAGETWO-30789
[South] Sprint 30
- Loading branch information
Showing
263 changed files
with
5,121 additions
and
1,258 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
app/code/Magento/Backend/Model/View/Layout/GeneratorPool.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Backend\Model\View\Layout; | ||
|
||
use Magento\Framework\View\Layout\ScheduledStructure; | ||
use Magento\Framework\View\Layout\Data\Structure; | ||
|
||
/** | ||
* Pool of generators for structural elements | ||
*/ | ||
class GeneratorPool extends \Magento\Framework\View\Layout\GeneratorPool | ||
{ | ||
/** | ||
* @var Filter\Acl | ||
*/ | ||
protected $aclFilter; | ||
|
||
/** | ||
* @param ScheduledStructure\Helper $helper | ||
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig | ||
* @param \Magento\Framework\App\ScopeResolverInterface $scopeResolver | ||
* @param Filter\Acl $aclFilter | ||
* @param array $generators | ||
*/ | ||
public function __construct( | ||
ScheduledStructure\Helper $helper, | ||
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, | ||
\Magento\Framework\App\ScopeResolverInterface $scopeResolver, | ||
Filter\Acl $aclFilter, | ||
array $generators = null | ||
) { | ||
$this->aclFilter = $aclFilter; | ||
parent::__construct( | ||
$helper, | ||
$scopeConfig, | ||
$scopeResolver, | ||
$generators | ||
); | ||
} | ||
|
||
/** | ||
* Build structure that is based on scheduled structure | ||
* | ||
* @param ScheduledStructure $scheduledStructure | ||
* @param Structure $structure | ||
* @return $this | ||
*/ | ||
protected function buildStructure(ScheduledStructure $scheduledStructure, Structure $structure) | ||
{ | ||
parent::buildStructure($scheduledStructure, $structure); | ||
$this->aclFilter->filterAclElements($scheduledStructure, $structure); | ||
return $this; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
app/code/Magento/Backend/Model/View/Layout/Reader/Block.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Backend\Model\View\Layout\Reader; | ||
|
||
use Magento\Framework\View\Layout; | ||
use Magento\Framework\Data\Argument\InterpreterInterface; | ||
|
||
/** | ||
* Backend block structure reader with ACL support | ||
*/ | ||
class Block extends Layout\Reader\Block | ||
{ | ||
public function __construct( | ||
Layout\ScheduledStructure\Helper $helper, | ||
Layout\Argument\Parser $argumentParser, | ||
Layout\ReaderPool $readerPool, | ||
InterpreterInterface $argumentInterpreter, | ||
$scopeType = null | ||
) { | ||
$this->attributes[] = 'acl'; | ||
parent::__construct( | ||
$helper, | ||
$argumentParser, | ||
$readerPool, | ||
$argumentInterpreter, | ||
$scopeType | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.