本文整理汇总了PHP中FieldGroup::getChildren方法的典型用法代码示例。如果您正苦于以下问题:PHP FieldGroup::getChildren方法的具体用法?PHP FieldGroup::getChildren怎么用?PHP FieldGroup::getChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FieldGroup
的用法示例。
在下文中一共展示了FieldGroup::getChildren方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Field
public function Field($properties = array())
{
$fields = new FieldGroup($this->name);
$fields->setID("{$this->name}_Holder");
list($countryCode, $areaCode, $phoneNumber, $extension) = $this->parseValue();
if ($this->value == "") {
$countryCode = $this->countryCode;
$areaCode = $this->areaCode;
$extension = $this->ext;
}
if ($this->countryCode !== null) {
$fields->push(new NumericField($this->name . '[Country]', '+', $countryCode, 4));
}
if ($this->areaCode !== null) {
$fields->push(new NumericField($this->name . '[Area]', '(', $areaCode, 4));
$fields->push(new NumericField($this->name . '[Number]', ')', $phoneNumber, 10));
} else {
$fields->push(new NumericField($this->name . '[Number]', '', $phoneNumber, 10));
}
if ($this->ext !== null) {
$fields->push(new NumericField($this->name . '[Extension]', 'ext', $extension, 6));
}
$description = $this->getDescription();
if ($description) {
$fields->getChildren()->First()->setDescription($description);
}
foreach ($fields as $field) {
$field->setDisabled($this->isDisabled());
$field->setReadonly($this->isReadonly());
}
return $fields;
}