本文整理汇总了PHP中FormField::getForm方法的典型用法代码示例。如果您正苦于以下问题:PHP FormField::getForm方法的具体用法?PHP FormField::getForm怎么用?PHP FormField::getForm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormField
的用法示例。
在下文中一共展示了FormField::getForm方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execCondition
/**
* execure the condition stored in this instance
* @return bool
*/
protected function execCondition()
{
if (class_exists('RuleEvaluator')) {
return RuleEvaluator::create()->Execute($this->condition, $this->field->getForm()->Fields());
}
return true;
}
示例2:
/**
* Create a new nullable field
* @param $valueField
* @return NullableField
*/
function __construct(FormField $valueField, $isNullLabel = null)
{
$this->valueField = $valueField;
$this->isNullLabel = $isNullLabel;
if (is_null($this->isNullLabel)) {
// Set a default label if one is not provided.
$this->isNullLabel = _t('NullableField.IsNullLabel', 'Is Null');
}
parent::__construct($valueField->getName(), $valueField->Title(), $valueField->Value(), $valueField->getForm(), $valueField->RightTitle());
$this->readonly = $valueField->isReadonly();
}
示例3: __construct
/**
* Create a new nullable field
*
* @param FormField $valueField
* @param null|string $isNullLabel
*/
public function __construct(FormField $valueField, $isNullLabel = null)
{
$this->valueField = $valueField;
if (isset($isNullLabel)) {
$this->setIsNullLabel($isNullLabel);
} else {
$this->isNullLabel = _t('NullableField.IsNullLabel', 'Is Null');
}
parent::__construct($valueField->getName(), $valueField->Title(), $valueField->Value());
$this->setForm($valueField->getForm());
$this->setRightTitle($valueField->RightTitle());
$this->setReadonly($valueField->isReadonly());
}
示例4: getForm
/**
* Get the form, checks for a current ContentModuleField first
* @return Form
*/
public function getForm()
{
$cModField = ContentModuleField::curr();
if ($cModField) {
return $cModField->getForm();
}
return parent::getForm();
}
示例5: getForm
/**
* Get the form our field belongs to
*
* @return FormField
*/
function getForm() {
return $this->field->getForm();
}