本文整理汇总了PHP中CheckboxField::Field方法的典型用法代码示例。如果您正苦于以下问题:PHP CheckboxField::Field方法的具体用法?PHP CheckboxField::Field怎么用?PHP CheckboxField::Field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CheckboxField
的用法示例。
在下文中一共展示了CheckboxField::Field方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Field
/**
* (non-PHPdoc)
* @see sapphire/forms/FormField#Field()
*/
function Field()
{
if ($this->isReadonly()) {
$nullableCheckbox = new CheckboxField_Readonly($this->getIsNullId());
} else {
$nullableCheckbox = new CheckboxField($this->getIsNullId());
}
$nullableCheckbox->setValue(is_null($this->dataValue()));
return $this->valueField->Field() . ' ' . $nullableCheckbox->Field() . ' <span>' . $this->getIsNullLabel() . '</span>';
}
示例2: Field
/**
* @param array $properties
* @return HTMLText
*/
public function Field($properties = array())
{
$this->addExtraClass('prettycheckablefield')->setAttribute('data-prettycheckableconfig', Convert::array2json($this->pretty_checkable_config));
//allow for not including default styles
if ($this->config()->get('require_css') == true) {
Requirements::css(PRETTY_CHECKABLE_FIELD_THIRDPARTY . '/prettyCheckable-2.1.2/dist/prettyCheckable.css');
}
Requirements::javascript(PRETTY_CHECKABLE_FIELD_THIRDPARTY . '/prettyCheckable-2.1.2/dist/prettyCheckable.min.js');
Requirements::javascript(PRETTY_CHECKABLE_FIELD_JAVASCRIPT . '/pretty.checkable.box.field.js');
return parent::Field($properties);
}
示例3: Field
/**
* @param array $properties
*
* @return string
*/
public function Field($properties = array())
{
if ($this->isReadonly()) {
$nullableCheckbox = new CheckboxField_Readonly($this->getIsNullId());
} else {
$nullableCheckbox = new CheckboxField($this->getIsNullId());
}
$nullableCheckbox->setValue(is_null($this->dataValue()));
return sprintf('%s %s <span>%s</span>', $this->valueField->Field(), $nullableCheckbox->Field(), $this->getIsNullLabel());
}
示例4: Field
public function Field($properties = array())
{
Requirements::css(SWITCHFIELD_PATH . '/css/switchfield.css');
return parent::Field($properties);
}