本文整理汇总了PHP中CTag::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP CTag::__construct方法的具体用法?PHP CTag::__construct怎么用?PHP CTag::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTag
的用法示例。
在下文中一共展示了CTag::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($value = NULL, $class = NULL)
{
parent::__construct('ul', 'yes');
$this->tag_end = '';
$this->addItem($value);
$this->setClass($class);
}
示例2: __construct
public function __construct($value, $class = null, $id = null)
{
parent::__construct('li', 'yes');
$this->addItem($value);
$this->addClass($class);
$this->attr('id', $id);
}
示例3: __construct
/**
* @param array $options['objectOptions'] an array of parameters to be added to the request URL
*
* @see jQuery.multiSelect()
*/
public function __construct(array $options = [])
{
parent::__construct('div', true);
$this->addClass('multiselect');
$this->setId(zbx_formatDomId($options['name']));
// url
$url = new CUrl('jsrpc.php');
$url->setArgument('type', PAGE_TYPE_TEXT_RETURN_JSON);
$url->setArgument('method', 'multiselect.get');
$url->setArgument('objectName', $options['objectName']);
if (!empty($options['objectOptions'])) {
foreach ($options['objectOptions'] as $optionName => $optionvalue) {
$url->setArgument($optionName, $optionvalue);
}
}
$params = ['url' => $url->getUrl(), 'name' => $options['name'], 'labels' => ['No matches found' => _('No matches found'), 'More matches found...' => _('More matches found...'), 'type here to search' => _('type here to search'), 'new' => _('new'), 'Select' => _('Select')]];
if (array_key_exists('data', $options)) {
$params['data'] = zbx_cleanHashes($options['data']);
}
foreach (['ignored', 'defaultValue', 'disabled', 'selectedLimit', 'addNew'] as $option) {
if (array_key_exists($option, $options)) {
$params[$option] = $options[$option];
}
}
if (array_key_exists('popup', $options)) {
foreach (['parameters', 'width', 'height'] as $option) {
if (array_key_exists($option, $options['popup'])) {
$params['popup'][$option] = $options['popup'][$option];
}
}
}
zbx_add_post_js('jQuery("#' . $this->getAttribute('id') . '").multiSelect(' . CJs::encodeJson($params) . ');');
}
示例4: __construct
public function __construct($label, $for = null)
{
parent::__construct('label', true, $label);
if ($for !== null) {
$this->setAttribute('for', zbx_formatDomId($for));
}
}
示例5: __construct
public function __construct($item = null, $class = null, $id = null)
{
parent::__construct('tr', 'yes');
$this->addItem($item);
$this->attr('class', $class);
$this->attr('id', $id);
}
示例6: __construct
public function __construct($name = '', $value = '0')
{
parent::__construct('input', 'no');
$this->options['type'] = 'hidden';
$this->options['name'] = $name;
$this->options['id'] = $name;
$this->setValue($value);
}
示例7: __construct
public function __construct($coords, $href, $alt, $shape)
{
parent::__construct('area', 'no');
$this->setCoords($coords);
$this->setShape($shape);
$this->setHref($href);
$this->setAlt($alt);
}
示例8: __construct
public function __construct($name = 'file', $value = '')
{
parent::__construct('input', 'no');
$this->setClass('biginput');
$this->setAttribute('type', 'file');
$this->setName($name);
$this->setFile($value);
}
示例9: __construct
public function __construct($item = null, $url = null)
{
parent::__construct('a', true);
if ($item !== null) {
$this->addItem($item);
}
$this->url = $url;
}
示例10: __construct
public function __construct()
{
parent::__construct('table', true);
$this->rownum = 0;
$this->header = '';
$this->footer = '';
$this->colnum = 1;
}
示例11: __construct
public function __construct($value, $caption = null, $selected = null, $enabled = null)
{
parent::__construct('option', 'yes');
$this->tag_body_start = '';
$this->setAttribute('value', $value);
$this->addItem($caption);
$this->setSelected($selected);
$this->setEnabled($enabled);
}
示例12: __construct
public function __construct($value, $caption = NULL, $selected = NULL, $enabled = NULL)
{
parent::__construct('option', 'yes');
$this->tag_body_start = '';
$this->options['value'] = $value;
$this->addItem($caption);
$this->setSelected($selected);
$this->setEnabled($enabled);
}
示例13: __construct
public function __construct($src = null, $width = '100%', $height = '100%', $scrolling = 'no', $id = 'iframe')
{
parent::__construct('iframe', true);
$this->setSrc($src);
$this->setWidth($width);
$this->setHeight($height);
$this->setScrolling($scrolling);
$this->setId($id);
}
示例14: __construct
public function __construct($name = 'button', $caption = '')
{
parent::__construct('button', true, $caption);
$this->setAttribute('type', 'button');
if ($name !== null) {
$this->setId(zbx_formatDomId($name));
$this->setAttribute('name', $name);
}
}
示例15: __construct
public function __construct($value, $class = null, $id = null)
{
parent::__construct('li', 'yes');
$this->addItem($value);
$this->addClass($class);
if (!empty($id)) {
$this->setAttribute('id', $id);
}
}