本文整理匯總了PHP中Control::toInput方法的典型用法代碼示例。如果您正苦於以下問題:PHP Control::toInput方法的具體用法?PHP Control::toInput怎麽用?PHP Control::toInput使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Control
的用法示例。
在下文中一共展示了Control::toInput方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: toInput
public function toInput()
{
if ($this->value == $this->getValue()) {
$this->set("checked");
}
return parent::toInput();
}
示例2: toInput
public function toInput()
{
if ($this->getValue() && $this->value == $this->getValue()) {
$this->set("checked");
}
// Also respect array value (for multiple checkboxes with same name)
if (is_array($this->value) && in_array($this->getValue(), $this->value)) {
$this->set("checked");
}
return parent::toInput();
}
示例3: testToInput
/**
* @covers Control::toInput
*/
public function testToInput()
{
$actual = $this->control->toInput();
$excepted = '<DateChoice ></DateChoice>';
$this->assertEquals($excepted, $actual);
}
示例4: toInput
public function toInput()
{
if ($this->showPopup) {
$script = $this->getCalInitScript();
$this->getForm()->setCalendarShown();
return parent::toInput() . $script;
}
if ($this->showTime) {
$return = $this->getHourDropdown();
if ($this->showMinute) {
$return .= ":" . $this->getMinuteDropdown();
} else {
$return .= $this->getMinuteDropdown(true);
}
$return .= " " . $this->getPMDropdown();
$return .= $this->getHiddenField();
} else {
$return = parent::toInput() . $this->getDateFormatLabel();
}
return $return;
}