当前位置: 首页>>代码示例>>PHP>>正文


PHP Layout::isManipulationAllowed方法代码示例

本文整理汇总了PHP中Magento\Framework\View\Layout::isManipulationAllowed方法的典型用法代码示例。如果您正苦于以下问题:PHP Layout::isManipulationAllowed方法的具体用法?PHP Layout::isManipulationAllowed怎么用?PHP Layout::isManipulationAllowed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Framework\View\Layout的用法示例。


在下文中一共展示了Layout::isManipulationAllowed方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testIsManipulationAllowed

 /**
  * @param bool $parentName
  * @param array $containerConfig
  * @param bool $result
  * @dataProvider isManipulationAllowedDataProvider
  */
 public function testIsManipulationAllowed($parentName, $containerConfig, $result)
 {
     $elementName = 'element_name';
     $this->structureMock->expects($this->once())->method('getParentId')->with($this->equalTo($elementName))->will($this->returnValue($parentName));
     if ($parentName) {
         $this->structureMock->expects($this->once())->method('hasElement')->with($this->equalTo($parentName))->will($this->returnValue($containerConfig['has_element']));
         if ($containerConfig['has_element']) {
             $this->structureMock->expects($this->once())->method('getAttribute')->with($this->equalTo($parentName), $this->equalTo('type'))->will($this->returnValue($containerConfig['attribute']));
         }
     }
     $this->assertSame($result, $this->model->isManipulationAllowed($elementName));
 }
开发者ID:opexsw,项目名称:magento2,代码行数:18,代码来源:LayoutTest.php

示例2: testIsManipulationAllowed

 public function testIsManipulationAllowed()
 {
     $this->_layout->addBlock('Magento\\Framework\\View\\Element\\Text', 'block1');
     $this->_layout->addBlock('Magento\\Framework\\View\\Element\\Text', 'block2', 'block1');
     $this->assertFalse($this->_layout->isManipulationAllowed('block1'));
     $this->assertFalse($this->_layout->isManipulationAllowed('block2'));
     $this->_layout->addContainer('container1', 'Container 1');
     $this->_layout->addBlock('Magento\\Framework\\View\\Element\\Text', 'block3', 'container1');
     $this->_layout->addContainer('container2', 'Container 2', [], 'container1');
     $this->assertFalse($this->_layout->isManipulationAllowed('container1'));
     $this->assertTrue($this->_layout->isManipulationAllowed('block3'));
     $this->assertTrue($this->_layout->isManipulationAllowed('container2'));
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:13,代码来源:LayoutTest.php

示例3: isManipulationAllowed

 /**
  * {@inheritdoc}
  */
 public function isManipulationAllowed($name)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'isManipulationAllowed');
     if (!$pluginInfo) {
         return parent::isManipulationAllowed($name);
     } else {
         return $this->___callPlugins('isManipulationAllowed', func_get_args(), $pluginInfo);
     }
 }
开发者ID:HaonanXu,项目名称:der-snack-backup,代码行数:12,代码来源:Interceptor.php


注:本文中的Magento\Framework\View\Layout::isManipulationAllowed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。