本文整理汇总了PHP中FieldGroup::setID方法的典型用法代码示例。如果您正苦于以下问题:PHP FieldGroup::setID方法的具体用法?PHP FieldGroup::setID怎么用?PHP FieldGroup::setID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FieldGroup
的用法示例。
在下文中一共展示了FieldGroup::setID方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Field
public function Field()
{
$field = new FieldGroup($this->name);
$field->setID("{$this->name}_Holder");
list($countryCode, $areaCode, $phoneNumber, $extension) = $this->parseValue();
$hasTitle = false;
if ($this->value == "") {
$countryCode = $this->countryCode;
$areaCode = $this->areaCode;
$extension = $this->ext;
}
if ($this->countryCode !== null) {
$field->push(new NumericField($this->name . '[Country]', '+', $countryCode, 4));
}
if ($this->areaCode !== null) {
$field->push(new NumericField($this->name . '[Area]', '(', $areaCode, 4));
$field->push(new NumericField($this->name . '[Number]', ')', $phoneNumber, 10));
} else {
$field->push(new NumericField($this->name . '[Number]', '', $phoneNumber, 10));
}
if ($this->ext !== null) {
$field->push(new NumericField($this->name . '[Extension]', 'ext', $extension, 6));
}
return $field;
}
示例2: 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;
}
示例3: Field
public function Field()
{
$field = new FieldGroup($this->name);
$field->setID("{$this->name}_Holder");
$valueArr = array();
list($valueArr['BankCode'], $valueArr['BranchCode'], $valueArr['AccountNumber'], $valueArr['AccountSuffix']) = explode(" ", $this->value);
$valueArr = self::convert_format_nz($valueArr);
$field->push(new NumericField($this->name . '[BankCode]', '', $valueArr['BankCode'], 2));
$field->push(new NumericField($this->name . '[BranchCode]', '', $valueArr['BranchCode'], 4));
$field->push(new NumericField($this->name . '[AccountNumber]', '', $valueArr['AccountNumber'], 8));
$field->push(new NumericField($this->name . '[AccountSuffix]', '', $valueArr['AccountSuffix'], 3));
return $field;
}
示例4: Field
public function Field()
{
$field = new FieldGroup($this->name);
$field->setID("{$this->name}_Holder");
$valueArr = $this->valueArr;
$valueArr = self::convert_format_nz($valueArr);
$field->push($n1 = new NumericField($this->name . '[BankCode]', '', $valueArr['BankCode'], 2));
$field->push($n2 = new NumericField($this->name . '[BranchCode]', '', $valueArr['BranchCode'], 4));
$field->push($n3 = new NumericField($this->name . '[AccountNumber]', '', $valueArr['AccountNumber'], 8));
$field->push($n4 = new NumericField($this->name . '[AccountSuffix]', '', $valueArr['AccountSuffix'], 3));
if ($this->tabIndex) {
$n1->setTabIndex($this->getTabIndex());
$n2->setTabIndex($this->getTabIndex() + 1);
$n3->setTabIndex($this->getTabIndex() + 2);
$n4->setTabIndex($this->getTabIndex() + 3);
}
return $field;
}