当前位置: 首页>>代码示例>>PHP>>正文


PHP HTML::tag方法代码示例

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


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

示例1: head

 /**
  * Generate <head> output
  */
 public function head()
 {
     echo HTML::paired_tag('title', $this->info->title->toString(config('meta.title.delimiter', ' &raquo; '))) . "\n";
     echo HTML::tag('meta', array('type' => 'keywords', 'content' => $this->info->keywords->toString(', '))) . "\n";
     echo HTML::tag('meta', array('type' => 'description', 'content' => $this->info->description->toString('. '))) . "\n";
     event('theme.head.meta.after');
 }
开发者ID:romartyn,项目名称:cogear,代码行数:10,代码来源:Gear.php

示例2: render

 public function render()
 {
     if ($this->callback) {
         $callback = Cogear::prepareCallback($this->callback);
         $this->setValues(call_user_func($callback));
     }
     $this->setAttributes();
     $code = array();
     foreach ($this->values as $key => $value) {
         $attributes = $this->attributes;
         $attributes['value'] = $key;
         if ($key === $this->value) {
             $attributes['checked'] = 'checked';
         }
         $code[] = HTML::tag('input', $attributes) . $value;
     }
     $code = implode("<br/>", $code);
     if ($this->wrapper) {
         $tpl = new Template($this->wrapper);
         $tpl->assign($this->attributes);
         $tpl->code = $code;
         $code = $tpl->render();
     }
     return $code;
 }
开发者ID:romartyn,项目名称:cogear,代码行数:25,代码来源:Radio.php

示例3: default_option

 public static function default_option($title = NULL)
 {
     if ($title === NULL) {
         $title = 'Seleccione';
     }
     return HTML::tag('option', __($title), array('value' => ''));
 }
开发者ID:stecj,项目名称:sime,代码行数:7,代码来源:HTML.php

示例4: __construct

 public function __construct()
 {
     $this->html = HTML::tag('table', array());
     $this->html->setOption('br.beforeContent', TRUE);
     $this->html->content = array();
     $this->firstTR = TRUE;
 }
开发者ID:pscheit,项目名称:psc-cms,代码行数:7,代码来源:Table.php

示例5: _build

 protected function _build($result, $default = NULL)
 {
     $html = $this->request->query('multiple') ? '' : HTML::default_option($default);
     foreach ($result as $key => $val) {
         $html .= HTML::tag('option', $val, array('value' => $key));
     }
     return $html;
 }
开发者ID:stecj,项目名称:sime,代码行数:8,代码来源:Ajax.php

示例6: hookResponse

 /**
  * Hook meta
  */
 public function hookResponse($Response)
 {
     $output = "";
     $output .= HTML::paired_tag('title', $this->info->title->toString(config('meta.title.delimiter', ' &raquo; '))) . "\n";
     $output .= HTML::tag('meta', array('type' => 'keywords', 'content' => $this->info->keywords->toString(', '))) . "\n";
     $output .= HTML::tag('meta', array('type' => 'description', 'content' => $this->info->description->toString('. '))) . "\n";
     $Response->output = str_replace(self::SNIPPET, $output, $Response->output);
 }
开发者ID:brussens,项目名称:cogear2,代码行数:11,代码来源:Gear.php

示例7: buildMedia

 /**
  * Helper method for building media tags.
  *
  * @param string $type       Tag type
  * @param mixed  $files      File or array of files
  * @param array  $attributes (optional) Tag attributes
  */
 protected static function buildMedia($type, $files, $attributes)
 {
     $sources = '';
     foreach ((array) $files as $file) {
         $sources .= HTML::tag('source', array('src' => $file));
     }
     return static::tag($type, $attributes, $sources);
 }
开发者ID:yash19970,项目名称:rapyd-framework,代码行数:15,代码来源:HTML.php

示例8: doInit

 protected function doInit()
 {
     $avaibleWidth = 100;
     $leftSpace = (int) floor($this->space / 2);
     $rightSpace = $this->space - $leftSpace;
     $left = $this->width - $leftSpace;
     $right = $avaibleWidth - $this->width - $rightSpace;
     $this->html = HTML::tag('div', (object) array('left' => HTML::tag('div', $this->leftContent, array('class' => 'left'))->setStyles(array('float' => 'left', 'width' => $left . '%', 'height' => '100%', 'margin-right' => $this->space . '%')), 'right' => HTML::tag('div', $this->rightContent, array('class' => 'right'))->setStyles(array('width' => $right . '%', 'float' => 'left', 'height' => '100%')), 'clear' => HTML::tag('div', NULL, array('style' => 'clear: left'))), array('class' => '\\Psc\\splitpane'));
 }
开发者ID:pscheit,项目名称:psc-cms,代码行数:9,代码来源:SplitPane.php

示例9: imageUrlDefault

 public static function imageUrlDefault()
 {
     $pathImage = IMAGE_PATH . '/default.png';
     if (file_exists($pathImage) && !is_dir($pathImage)) {
         list($width, $height) = getimagesize($pathImage);
         // พบไฟล์
         return HTML::tag('img', System::$urlImage . 'default.png' . HTML::getFileCache(), ['width' => $width, 'height' => $height]);
     }
 }
开发者ID:drivesoftz,项目名称:phalcon2-app-basic,代码行数:9,代码来源:HTML.php

示例10: script

 /**
  * return a script tag
  */
 function script($content = '')
 {
     $tag = 'script';
     $attr = array();
     // html5 specifies default values for type attributes
     if (HTML::html_version() != 5) {
         $attr['type'] = 'text/javascript';
     }
     return HTML::tag($tag, $attr, $content);
 }
开发者ID:Raven24,项目名称:DbAcl,代码行数:13,代码来源:html.class.php

示例11: build_alert

 /**
  * Build the UI alerts
  *
  * @param array 		$alerts
  * @return UI\HTML
  */
 public function build_alert($alerts)
 {
     return HTML::tag('div', function () use($alerts) {
         // loop trough all alert types
         foreach ($alerts as $type => $items) {
             foreach ($items as $alert) {
                 $alert = implode("<br>\n", $alert);
                 // close button
                 $close = HTML::tag('button', '&times;')->add_class('close')->type('button')->data('dismiss', 'alert');
                 // alert div
                 echo HTML::tag('div', $close . $alert)->add_class('alert fade in')->add_class('alert-' . $type);
             }
         }
     })->add_class('ui-alert-container');
 }
开发者ID:clancats,项目名称:core,代码行数:21,代码来源:Bootstrap.php

示例12: morph

 public function morph()
 {
     foreach ($this->inputs as $key => $input) {
         if (!$input instanceof FormInput) {
             $input = new FormInput($input);
         }
         foreach ($this->styles as $style => $v) {
             if ($input->isAllowedStyle($style)) {
                 $input->getTag()->setStyle($style, $v);
             }
         }
         if ($this->getOption('wrap', TRUE)) {
             $wrapper = HTML::tag('div', new \stdClass(), array('class' => 'input-set-wrapper'));
             $wrapper->content->input = $input;
             $wrapper->content->input->morph();
             $this->elements[$key] = $wrapper;
         } else {
             $input->morph();
             $this->elements[$key] = $input;
         }
     }
     $this->morphed = TRUE;
     return $this;
 }
开发者ID:pscheit,项目名称:psc-cms,代码行数:24,代码来源:FormInputSet.php

示例13: defined

if (defined("OPEN_BUFFER") && OPEN_BUFFER) {
    defined("OPEN_ENCODING") && OPEN_ENCODING == "UTF-8" ? ob_start("_convert2Utf8") : ob_start();
}
if (strpos($_contentType, "application/xhtml+xml") !== false) {
    // To prevent 'short_open_tag = On' mistake
    echo '<?xml version="1.0" encoding="' . OPEN_ENCODING . '" standalone="no" ?>' . PHP_EOL;
}
echo '<!DOCTYPE html PUBLIC "' . $_docType . '">' . PHP_EOL;
echo HTML::start('html', array('xmlns' => 'http://www.w3.org/1999/xhtml', 'xml:lang' => str_replace("_", "-", OPEN_LANGUAGE), 'dir' => OPEN_DIRECTION));
echo HTML::start('head');
echo HTML::start('meta', array('http-equiv' => 'Content-Type', 'content' => $_contentType), true);
$_titlePage = isset($titlePage) ? $titlePage : (isset($title) && !empty($title) ? $title : "");
/**
 * @since 0.8
 */
$_titlePage .= isset($formError) && count($formError) > 0 && isset($focusFormField) ? " : " . _("Error occurred") : "";
if (defined("OPEN_CLINIC_NAME") && OPEN_CLINIC_NAME) {
    $_titlePage .= ' : ' . OPEN_CLINIC_NAME;
}
echo HTML::tag('title', $_titlePage);
//echo HTML::start('meta', array('http-equiv' => 'Content-Style-Type', 'content' => 'text/css2'), true);
echo HTML::start('meta', array('http-equiv' => 'Cache-Control', 'content' => 'no-store,no-cache,must-revalidate'), true);
echo HTML::start('meta', array('http-equiv' => 'Pragma', 'content' => 'no-cache'), true);
echo HTML::start('meta', array('http-equiv' => 'Expires', 'content' => '-1'), true);
echo HTML::start('meta', array('http-equiv' => 'imagetoolbar', 'content' => 'no'), true);
echo HTML::start('meta', array('name' => 'robots', 'content' => 'noindex,nofollow,noarchive'), true);
echo HTML::start('meta', array('name' => 'MSSmartTagsPreventParsing', 'content' => 'TRUE'), true);
echo HTML::start('meta', array('name' => 'author', 'content' => 'Jose Antonio Chavarría'), true);
echo HTML::start('meta', array('name' => 'copyright', 'content' => '2002-' . date("Y") . ' Jose Antonio Chavarría'), true);
echo HTML::start('meta', array('name' => 'keywords', 'content' => 'OpenClinic, open source, gpl, healthcare, php, mysql, coresis'), true);
echo HTML::start('meta', array('name' => 'description', 'content' => 'OpenClinic is an easy to use, open source, medical records system written in PHP'), true);
开发者ID:edubort,项目名称:openclinic-1,代码行数:31,代码来源:xhtml_start.php

示例14: tag

function tag($tag)
{
    HTML::macro($tag, function ($innards = '', $attributes = null) use($tag) {
        return HTML::tag($tag, $innards, $attributes);
    });
}
开发者ID:furey,项目名称:laravel-utils,代码行数:6,代码来源:htmlmacros.php

示例15: dirname

/**
 * test_fields.php
 *
 * Fields of medical test
 *
 * Licensed under the GNU GPL. For full terms see the file LICENSE.
 *
 * @package   OpenClinic
 * @copyright 2002-2008 jact
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL
 * @version   CVS: $Id: test_fields.php,v 1.22 2008/03/23 12:00:18 jact Exp $
 * @author    jact <jachavar@gmail.com>
 */
require_once dirname(__FILE__) . "/../lib/exe_protect.php";
executionProtection(__FILE__);
$tbody = array();
$row = Form::label("document_type", _("Document Type") . ":");
$row .= Form::text("document_type", isset($formVar["document_type"]) ? $formVar["document_type"] : null, array('size' => 40, 'maxlength' => 128, 'error' => isset($formError["document_type"]) ? $formError["document_type"] : null));
$tbody[] = $row;
//$row .= Form::hidden("MAX_FILE_SIZE", "70000");
// @todo hacer helper para esta estructura
$row = Form::label("path_filename", _("Path Filename") . ":", array('class' => 'required'));
$row .= Form::file("path_filename", isset($formVar['path_filename']) ? $formVar['path_filename'] : null, array('size' => 50, 'readonly' => true, 'error' => isset($formError["path_filename"]) ? $formError["path_filename"] : null));
if (isset($formVar['path_filename'])) {
    $row .= Form::hidden('previous', $formVar['path_filename']);
    $row .= HTML::tag('strong', $formVar['path_filename'], array('class' => 'previous_file'));
}
$tbody[] = $row;
$tfoot = array(Form::button("save", _("Submit")) . Form::generateToken());
echo Form::fieldset($title, $tbody, $tfoot);
开发者ID:edubort,项目名称:openclinic-1,代码行数:30,代码来源:test_fields.php


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