Magento:为所有 child 阻止unsetChild吗?

标签 magento layout block unset

我知道:

<action method="unsetChild"><name>as</name></action>

是否可以将所有子级都移到一行中?例如:
<action method="unsetChild"><name>*</name></action>

或类似的东西..?

更新-解答:
<action method="unsetChildren"/>

似乎做得很好。

最佳答案

不要害怕阅读基块类的源文件。

#File: app/code/core/Mage/Core/Block/Abstract.php
public function unsetChildren()
{
    $this->_children       = array();
    $this->_sortedChildren = array();
    return $this;
}

这些方法有无数的答案。

关于Magento:为所有 child 阻止unsetChild吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20455824/

相关文章:

magento - 在 magento 自定义模块的后端添加多个选项卡和表单,就像客户后端位置一样

android - 以 Listview 中的百分比设置相同的 ImageView 高度和宽度

wordpress - 将 WordPress REST API 用于 Gutenberg block 时,不会对 HTML 实体进行解码

objective-c - 完成 block 不执行

CSS "display: inline-block"拒绝断行

java - PHP 的 oAuth 客户端模块

php - 在 magento 中获取产品图像时找不到图像文件

Magento 愿望 list - 删除项目

android - 为什么 imageview 在布局上消失了?

html - 我无法推断出这背后的功能,需要专家协助