本文整理汇总了PHP中utils::htmlTag方法的典型用法代码示例。如果您正苦于以下问题:PHP utils::htmlTag方法的具体用法?PHP utils::htmlTag怎么用?PHP utils::htmlTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utils
的用法示例。
在下文中一共展示了utils::htmlTag方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toXul
public function toXul()
{
if ($this->cfg->mode == 'view') {
return $this->getValue();
}
return utils::htmlTag($this->xulTagName, array_merge($this->xul, array('id' => $this->id, 'value' => $this->getRawValue())));
}
示例2: toHtml
public function toHtml()
{
if ($this->cfg->mode == 'view') {
return $this->getValue();
}
$options = $this->tinyMce;
if (is_array($this->cfg->tinyBrowser) && $this->cfg->getInArray('tinyBrowser', 'active')) {
$tinyBrowser = $this->cfg->tinyBrowser;
$options['file_browser_callback'] = 'function(field_name, url, type, win) {
tinyMCE.activeEditor.windowManager.open({
file : "' . $tinyBrowser['url'] . '?' . session::getInstance()->getSessIdForce() . '=' . urlencode(session_id()) . '&type=" + type' . ($tinyBrowser['subdir'] ? '+"&subdir=' . $tinyBrowser['subdir'] . '"' : '') . ',
title : "' . $tinyBrowser['title'] . '",
width : ' . $tinyBrowser['width'] . ',
height : ' . $tinyBrowser['height'] . ',
resizable : "yes",
scrollbars : "yes",
inline : "yes", // This parameter only has an effect if you use the inlinepopups plugin!
close_previous : "no"
}, {
window : win,
input : field_name
});
return false;
}';
} else {
if (is_array($this->cfg->nyroBrowser) && $this->cfg->getInArray('nyroBrowser', 'active')) {
$nyroBrowser = $this->cfg->nyroBrowser;
$options['file_browser_callback'] = 'function(field_name, url, type, win) {
tinyMCE.activeEditor.windowManager.open({
file : "' . $nyroBrowser['url'] . '?' . session::getInstance()->getSessIdForce() . '=' . urlencode(session_id()) . '&type="+type+"&config=' . $nyroBrowser['config'] . '&",
title : "' . $nyroBrowser['title'] . '",
width : ' . $nyroBrowser['width'] . ',
height : ' . $nyroBrowser['height'] . ',
resizable : "yes",
scrollbars : "yes",
inline : "yes", // This parameter only has an effect if you use the inlinepopups plugin!
close_previous : "no"
}, {
window : win,
input : field_name
});
return false;
}';
}
}
if (array_key_exists('content_css', $options) && $options['content_css']) {
$contentCss = $options['content_css'];
$options['setup'] = 'function(ed) {ed.onInit.add(function(ed) {setTimeout(function() {ed.dom.add(ed.dom.select("head"), "link", {rel : "stylesheet", href : "' . $contentCss . '"});}, 5);});}';
}
unset($options['content_css']);
$resp = response::getInstance()->getProxy();
$resp->addJs('jquery.tinymce');
$resp->blockjQuery('$("#' . $this->id . '").tinymce(' . utils::jsEncode($options) . ');');
return utils::htmlTag($this->htmlTagName, array_merge($this->html, array('name' => $this->name, 'id' => $this->id)), utils::htmlOut($this->getValue()));
}
示例3: getView
/**
* Get the view for the uploaded element
*
* @return string
*/
public function getView()
{
$ret = null;
if ($current = $this->getCurrent()) {
if (!($ret = $this->callHelper('view', $current, null))) {
$ret = utils::htmlTag('a', array_merge($this->cfg->previewPrm, array('href' => request::uploadedUri($current))), $this->cfg->previewText ? $this->cfg->previewText : basename($current));
}
}
return $ret;
}
示例4: toXul
public function toXul()
{
return utils::htmlTag($this->xulTagName, array_merge($this->xul, array('id' => $this->id, 'min' => $this->min, 'min' => $this->max, 'increment' => $this->step, 'value' => $this->getRawValue())));
}
示例5: toHtml
public function toHtml()
{
return str_replace('[name]', $this->name, sprintf($this->cfg->template, utils::htmlTag($this->htmlTagName, array_merge($this->html, array('name' => $this->name . '[0]', 'id' => $this->makeId($this->name . '[0]'), 'value' => $this->getValue('min', 'input')))), utils::htmlTag($this->htmlTagName, array_merge($this->html, array('name' => $this->name . '[1]', 'id' => $this->makeId($this->name . '[1]'), 'value' => $this->getValue('max', 'input'))))));
}
示例6: getHtmlMeta
/**
* Get the HTML Meta
*
* @param string $ln New line character
* @return strings
*/
protected function getHtmlMeta($ln = "\n") {
$ret = null;
if (array_key_exists('Content-Type', $this->headers))
$ret.= '<meta http-equiv="Content-Type" content="'.$this->headers['Content-Type'].'" />'.$ln;
if ($this->cfg->titleInDes)
$this->cfg->setInArray('meta', 'description',
$this->cfg->getInarray('meta', 'title').
$this->cfg->titleInDes.
$this->cfg->getInarray('meta', 'description'));
foreach($this->cfg->meta as $k=>$v) {
if ($k != 'title' || $this->cfg->useTitleInMeta)
$ret.= '<meta name="'.$k.'" content="'.utils::htmlOut($v).'" />'.$ln;
}
foreach($this->cfg->metaProperty as $k=>$v)
$ret.= '<meta property="'.$k.'" content="'.utils::htmlOut($v).'" />'.$ln;
foreach($this->cfg->link as $k=>$v)
$ret.= utils::htmlTag('link', array_merge(array('rel'=>$k), utils::htmlOut($v))).$ln;
return $ret;
}
示例7: toXul
public function toXul()
{
return utils::htmlTag($this->xulTagName, array_merge($this->xul, array('id' => $this->id, 'value' => $this->getRawValue())));
}
示例8: toXul
public function toXul()
{
return utils::htmlTag($this->xulTagName, array_merge($this->xul, array('id' => $this->id, 'value' => $this->date->format('date', 'short2'))));
}
示例9: toXul
public function toXul()
{
return utils::htmlTag($this->xulTagName, array_merge($this->xul, array('id' => $this->id)));
}
示例10: html
/**
* Make an image with the configuration parameter
*
* @return string|null The HTML string or null if the image doesn't exists
*/
protected function html(array $options = array())
{
if (file::exists($this->cfg->fileSave)) {
$w = $this->cfg->wAct ? $this->cfg->wAct : null;
$h = $this->cfg->hAct ? $this->cfg->hAct : null;
if ($this->cfg->forceHtmlSize && (!$w || !$h)) {
$size = getimagesize($this->cfg->fileSave);
if (!$w) {
$w = $size[0];
}
if (!$h) {
$h = $size[1];
}
}
return utils::htmlTag('img', array_merge($options, $this->cfg->htmlDefOptions, array('src' => $this->cfg->fileSave, 'alt' => $this->cfg->alt, 'width' => $w, 'height' => $h)));
}
return null;
}