mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-04 07:14:06 +01:00
28 lines
437 B
PHP
28 lines
437 B
PHP
<?php
|
|
|
|
class CFormStringElement extends CFormElement
|
|
{
|
|
public $content;
|
|
private $_on;
|
|
|
|
public function getVisible()
|
|
{
|
|
return empty($this->on) || in_array($this->getForm()->getModel()->getScenario(),$this->on);
|
|
}
|
|
|
|
public function getOn()
|
|
{
|
|
return $this->_on;
|
|
}
|
|
|
|
public function setOn($value)
|
|
{
|
|
$this->_on=preg_split('/[\s,]+/',$value,-1,PREG_SPLIT_NO_EMPTY);
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return $this->content;
|
|
}
|
|
}
|