本文整理汇总了PHP中CDiv::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP CDiv::__construct方法的具体用法?PHP CDiv::__construct怎么用?PHP CDiv::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDiv
的用法示例。
在下文中一共展示了CDiv::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Construct widget.
*
* @param string $id
* @param string|array|CTag $body
*/
public function __construct($id, $body = null)
{
$this->id = $id;
$this->body = $body ? array($body) : array();
parent::__construct(null, 'ui-widget ui-widget-content ui-helper-clearfix ui-corner-all widget ui-tabs');
$this->setAttribute('id', $this->id . '_widget');
}
示例2: __construct
public function __construct($name = 'radio', $value = 'yes')
{
$this->count = 0;
$this->name = $name;
$this->value = $value;
$this->orientation = self::ORIENTATION_HORIZONTAL;
parent::__construct(null, null, $name);
}
示例3: __construct
/**
* Construct widget.
*
* @param string $id
* @param string|array|CTag $body
*/
public function __construct($id, $body = null)
{
$this->id = $id;
$this->body = $body ? [$body] : [];
parent::__construct();
$this->addClass('dashbrd-widget');
$this->setId($this->id . '_widget');
}
示例4: __construct
public function __construct($title, $class, $action = '')
{
parent::__construct(SPACE, $class . ' menu_icon');
$this->setAttribute('title', $title);
if (!empty($action)) {
$this->setAttribute('onclick', 'javascript: ' . $action);
}
}
示例5: __construct
public function __construct($name, $value, $insert_color_picker = true)
{
parent::__construct([(new CColorCell('lbl_' . $name, $value))->setTitle('#' . $value)->onClick('javascript: show_color_picker("' . zbx_formatDomId($name) . '")'), (new CTextBox($name, $value))->setWidth(ZBX_TEXTAREA_COLOR_WIDTH)->setAttribute('maxlength', 6)->onChange('set_color_by_name("' . zbx_formatDomId($name) . '", this.value)')]);
$this->addClass(ZBX_STYLE_INPUT_COLOR_PICKER);
if ($insert_color_picker) {
insert_show_color_picker_javascript();
}
}
示例6: __construct
public function __construct($id, $class = null, $editable = true)
{
$this->editable = $editable;
$this->formList = new CList(null, 'formlist');
parent::__construct();
$this->attr('id', zbx_formatDomId($id));
$this->attr('class', $class);
}
示例7: __construct
public function __construct($name, $value, $action = null)
{
parent::__construct(SPACE . SPACE . SPACE, 'pointer');
$this->setName($name);
$this->attr('id', zbx_formatDomId($name));
$this->attr('title', '#' . $value);
$this->attr('style', 'display: inline; width: 10px; height: 10px; text-decoration: none; border: 1px solid black; background-color: #' . $value);
$this->attr('onclick', $action);
}
示例8: __construct
public function __construct($name = null, $color)
{
parent::__construct();
if ($name !== null) {
$this->setName($name);
$this->setId(zbx_formatDomId($name));
}
$this->setAttribute('style', 'background: #' . $color);
}
示例9: __construct
public function __construct($name, $value, $action = null)
{
parent::__construct(SPACE . SPACE . SPACE, null);
$this->setName($name);
$this->setAttribute('id', $name);
$this->setAttribute('title', '#' . $value);
$this->setAttribute('class', 'pointer');
$this->setAttribute('style', 'display: inline; width: 10px; height: 10px; text-decoration: none; outline: 1px solid black; background-color: #' . $value);
$this->setAction($action);
}
示例10: __construct
public function __construct($header, $messages = [], $buttons = [])
{
parent::__construct($header);
$this->addClass(ZBX_STYLE_MSG_BAD);
$this->addClass('msg-global');
if ($messages) {
parent::addItem((new CDiv((new CList($messages))->addClass(ZBX_STYLE_MSG_DETAILS_BORDER)))->addClass(ZBX_STYLE_MSG_DETAILS));
}
parent::addItem((new CDiv($buttons))->addClass('msg-buttons'));
}
示例11: __construct
public function __construct($id, $body = null, $state = null)
{
$this->domid = $id;
$this->state = $state;
// 0 - closed, 1 - opened
$this->css_class = 'header';
$this->_header = null;
$this->_body = array($body);
$this->_footer = null;
parent::__construct(null, 'ui-widget ui-widget-content ui-helper-clearfix ui-corner-all widget');
$this->setAttribute('id', $id . '_widget');
}
示例12: __construct
public function __construct()
{
parent::__construct();
$this->addClass(ZBX_STYLE_CLOCK);
$this->width = 150;
$this->height = 150;
$this->time_zone_string = null;
$this->footer = null;
$this->time = null;
$this->time_zone_offset = null;
$this->error = null;
}
示例13: __construct
public function __construct($data = array())
{
if (isset($data['id'])) {
$this->id = $data['id'];
}
if (isset($data['remember'])) {
$this->setRemember($data['remember']);
}
if (isset($data['selected'])) {
$this->setSelected($data['selected']);
}
parent::__construct();
$this->attr('id', zbx_formatDomId($this->id));
$this->attr('class', 'min-width hidden');
}
示例14: __construct
public function __construct($data = [])
{
if (isset($data['id'])) {
$this->id = $data['id'];
}
if (isset($data['selected'])) {
$this->setSelected($data['selected']);
}
if (isset($data['disabled'])) {
$this->setDisabled($data['disabled']);
}
parent::__construct();
$this->setId(zbx_formatDomId($this->id));
$this->addClass(ZBX_STYLE_TABLE_FORMS_CONTAINER);
}
示例15: __construct
public function __construct($data = array())
{
if (isset($data['id'])) {
$this->id = $data['id'];
}
if (isset($data['selected'])) {
$this->setSelected($data['selected']);
}
if (isset($data['disabled'])) {
$this->setDisabled($data['disabled']);
}
parent::__construct();
$this->attr('id', zbx_formatDomId($this->id));
$this->attr('class', 'tabs');
}