本文整理汇总了PHP中FieldList::setContainerField方法的典型用法代码示例。如果您正苦于以下问题:PHP FieldList::setContainerField方法的具体用法?PHP FieldList::setContainerField怎么用?PHP FieldList::setContainerField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FieldList
的用法示例。
在下文中一共展示了FieldList::setContainerField方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($children = null)
{
if ($children instanceof FieldList) {
$this->children = $children;
} elseif (is_array($children)) {
$this->children = new FieldList($children);
} else {
//filter out null/empty items
$children = array_filter(func_get_args());
$this->children = new FieldList($children);
}
$this->children->setContainerField($this);
parent::__construct(null, false);
}
示例2: __construct
public function __construct($children = null)
{
if ($children instanceof FieldList) {
$this->children = $children;
} elseif (is_array($children)) {
$this->children = new FieldList($children);
} else {
$children = is_array(func_get_args()) ? func_get_args() : array();
$this->children = new FieldList($children);
}
$this->children->setContainerField($this);
// Skipping FormField::__construct(), but we have to make sure this
// doesn't count as a broken constructor
$this->brokenOnConstruct = false;
Object::__construct();
}