• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CTag类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中CTag的典型用法代码示例。如果您正苦于以下问题:PHP CTag类的具体用法?PHP CTag怎么用?PHP CTag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了CTag类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: italic

function italic($str)
{
    if (is_array($str)) {
        foreach ($str as $key => $val) {
            if (is_string($val)) {
                $em = new CTag('em', true);
                $em->addItem($val);
                $str[$key] = $em;
            }
        }
    } elseif (is_string($str)) {
        $em = new CTag('em', true, '');
        $em->addItem($str);
        $str = $em;
    }
    return $str;
}
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:17,代码来源:html.inc.php


示例2: bold

function bold($str)
{
    if (is_array($str)) {
        foreach ($str as $key => $val) {
            if (is_string($val)) {
                $b = new CTag('strong', 'yes');
                $b->addItem($val);
                $str[$key] = $b;
            }
        }
    } else {
        $b = new CTag('strong', 'yes', '');
        $b->addItem($str);
        $str = $b;
    }
    return $str;
}
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:17,代码来源:html.inc.php


示例3: __construct

 public function __construct($label, $for = null)
 {
     parent::__construct('label', true, $label);
     if ($for !== null) {
         $this->setAttribute('for', zbx_formatDomId($for));
     }
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:7,代码来源:CLabel.php


示例4: setAction

 public function setAction($value = NULL)
 {
     if (is_null($value)) {
         return $this->attributes['action'] = $page['file'];
     }
     return parent::addAction('onclick', $value);
 }
开发者ID:phedders,项目名称:zabbix,代码行数:7,代码来源:class.clink.php


示例5: __construct

 public function __construct($value, $class = null, $id = null)
 {
     parent::__construct('li', 'yes');
     $this->addItem($value);
     $this->addClass($class);
     $this->attr('id', $id);
 }
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:7,代码来源:CListItem.php


示例6: __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) . ');');
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:38,代码来源:CMultiSelect.php


示例7: addItem

 public function addItem($value)
 {
     if (strtolower(get_class($value)) != 'carea') {
         return $this->error('Incorrect value for addItem [' . $value . ']');
     }
     return parent::addItem($value);
 }
开发者ID:rennhak,项目名称:zabbix,代码行数:7,代码来源:class.cmap.php


示例8: bodyToString

 public function bodyToString()
 {
     $ret = parent::bodyToString();
     $ret .= $this->srcParam->toString();
     $ret .= $this->embededFlash->toString();
     return $ret;
 }
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:7,代码来源:CFlash.php


示例9: addItem

 public function addItem($value)
 {
     if (is_object($value) && zbx_strtolower(get_class($value)) != 'carea') {
         return $this->error('Incorrect value for addItem "' . $value . '".');
     }
     return parent::addItem($value);
 }
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:7,代码来源:class.careamap.php


示例10: __construct

 public function __construct($name = 'file', $value = '')
 {
     parent::__construct('input', 'no');
     $this->setClass('biginput');
     $this->setAttribute('type', 'file');
     $this->setName($name);
     $this->setFile($value);
 }
开发者ID:songyuanjie,项目名称:zabbix-stats,代码行数:8,代码来源:class.cfile.php


示例11: addItem

 public function addItem($value, $class = null, $id = null)
 {
     if (!is_null($value) && $this->emptyList) {
         $this->emptyList = false;
         $this->items = array();
     }
     parent::addItem($this->prepareItem($value, $class, $id));
 }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:8,代码来源:class.clist.php


示例12: __construct

 public function __construct($coords, $href, $alt, $shape)
 {
     parent::__construct('area', 'no');
     $this->setCoords($coords);
     $this->setShape($shape);
     $this->setHref($href);
     $this->setAlt($alt);
 }
开发者ID:phedders,项目名称:zabbix,代码行数:8,代码来源:class.carea.php


示例13: __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);
 }
开发者ID:rennhak,项目名称:zabbix,代码行数:8,代码来源:class.cvartag.php


示例14: __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);
 }
开发者ID:rennhak,项目名称:zabbix,代码行数:9,代码来源:class.ccomboitem.php


示例15: __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);
 }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:9,代码来源:class.ccomboitem.php


示例16: __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);
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:9,代码来源:CIFrame.php


示例17: __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);
     }
 }
开发者ID:quanta-computing,项目名称:debian-packages,代码行数:9,代码来源:class.clistitem.php


示例18: __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);
     }
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:9,代码来源:CButton.php


示例19: __construct

 public function __construct($type = 'text', $name = 'textbox', $value = '')
 {
     parent::__construct('input');
     $this->setType($type);
     // if id is not passed, it will be the same as element name
     $this->setId(zbx_formatDomId($name));
     $this->setAttribute('name', $name);
     $this->setAttribute('value', $value);
     return $this;
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:10,代码来源:CInput.php


示例20: addItem

 public function addItem($value, $class = null)
 {
     if (is_array($value)) {
         foreach ($value as $el) {
             parent::addItem($this->prepareItem($el, $class));
         }
     } else {
         parent::addItem($this->prepareItem($value, $class));
     }
 }
开发者ID:rennhak,项目名称:zabbix,代码行数:10,代码来源:class.clist.php



注:本文中的CTag类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CTask类代码示例发布时间:2022-05-20
下一篇:
PHP CTableInfo类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap