當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Html::startTag方法代碼示例

本文整理匯總了PHP中Html::startTag方法的典型用法代碼示例。如果您正苦於以下問題:PHP Html::startTag方法的具體用法?PHP Html::startTag怎麽用?PHP Html::startTag使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Html的用法示例。


在下文中一共展示了Html::startTag方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getWriteDisplay

 /**
  * show the data in an input element for editing
  *
  * @return string
  */
 protected function getWriteDisplay()
 {
     $selectedOptionNames = explode(', ', $this->value);
     $output = Html::startTag('div', ['class' => $this->class]);
     $connectedClassName = $this->fieldinfo->getConnectedClass();
     /** @var BaseConnectionObject $connObj */
     $connObj = new $connectedClassName();
     $class = $connObj->getOtherClass($this->fieldinfo->getClass());
     $obj = Factory::createObject($class);
     $connectedFieldName = $this->fieldinfo->getFieldsOfConnectedClass();
     $table = DB::table($obj->getTable());
     $result = Finder::create($class)->find([$table->getColumn($connectedFieldName), $table->getColumn('LK')]);
     foreach ($result as $row) {
         $params = [];
         $params['value'] = $row['LK'];
         $params['type']  = 'checkbox';
         $params['class'] = 'checkbox';
         $params['name']  = $this->name . '[]';
         if (in_array($row[$connectedFieldName], $selectedOptionNames)) {
             $params['checked'] = 'checked';
         }
         $output .= Html::startTag('p') . Html::singleTag('input', $params) . " " . $row[$connectedFieldName] . Html::endTag('p');
     }
     $output .= Html::endTag('div');
     return $output;
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:31,代碼來源:MnConnection.php

示例2: display

    public function display(OutputDevice $od)
    {
        $od->addContent(Html::startTag('div', ['class' => 'leftNavigation']));
        foreach ($this->getNaviStructure() as $category => $entries) {
            $od->addContent(Html::startTag('h3') . $category . Html::endTag('h3'));
            $od->addContent(Html::startTag('div'));
            $od->addContent(Html::startTag('ul'));
            foreach ($entries as $entryName => $url) {
                $od->addContent(Html::startTag('li') . Html::url(HTML_ROOT . "/de/acp/$url", $entryName) . Html::endTag('li'));
            }
            $od->addContent(Html::endTag('ul'));
            $od->addContent(Html::endTag('div'));
        }
//        $od->addContent(Html::startTag('div', ['id' => 'leftNavigation']));
//        $od->addContent(Html::startTag('ul', ['id' => 'leftNavigation']));
//        foreach ($this->getNaviStructure() as $category => $content) {
//            if (is_string($content)) {
//                $od->addContent(Html::startTag('li') . Html::url(HTML_ROOT . "/de/acp/$content", $category) . Html::endTag('li'));
//                continue;
//            }
//            $od->addContent(Html::startTag('li') . $category);
//            $od->addContent(Html::startTag('ul'));
//            foreach ($content as $name => $url) {
//                $od->addContent(Html::startTag('li') . Html::url(HTML_ROOT . "/de/acp/$url", $name) . Html::endTag('li'));
//            }
//            $od->addContent(Html::endTag('ul'));
//            $od->addContent(Html::endTag('li'));
//        }
//        $od->addContent(Html::endTag('ul'));
//        $od->addContent('<br style="clear:both" />');

        $od->addContent(Html::endTag('div'));
    }
開發者ID:kafruhs,項目名稱:fws,代碼行數:33,代碼來源:Navigation.php

示例3: display

 /**
  * display the header div
  *
  * @param OutputDevice $od
  */
 public function display(OutputDevice $od)
 {
     $od->addContent(Html::startTag('body'));
     $od->addContent(Html::startTag('div', array('class' => 'pageStructure')) . "\n");
     $od->addContent(Html::startTag('div', array('class' => $this->getCssClass())) . "\n");
     $od->addContent($this->getContent());
     $od->addContent(Html::endTag('div'));
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:13,代碼來源:Header.php

示例4: startMainContent

 /**
  * starts the main content section of the page
  *
  * @param OutputDevice $od
  */
 public static function startMainContent(OutputDevice $od)
 {
     $od->addContent(Html::startTag('div', array('class' => 'mainContent', 'id' => 'mainContent')));
     $requestHelper = new RequestHelper();
     $ajaxMsg = $requestHelper->getParam('ajaxMsg');
     $od->addContent(Html::ajaxMsgDiv($ajaxMsg));
     $od->addContent(Html::loaderDiv());
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:13,代碼來源:ACP.php

示例5: display

 /**
  * display the footer section of the page
  *
  * @param OutputDevice $od
  */
 public function display(OutputDevice $od)
 {
     $od->addContent(Html::startTag('div', ['style' => 'clear:both']) . Html::endTag('div'));
     $od->addContent(Html::startTag('div', array('class' => $this->getCssClass())));
     $od->addContent($this->getContent());
     $od->addContent(Html::endTag('div'));
     $od->addContent(Html::endTag('div'));
     $od->addContent(Html::endTag('body'));
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:14,代碼來源:Footer.php

示例6: exception_handler

function exception_handler(Exception $exception) {
    $div = Html::startTag('div', array('id' => 'exceptionBox'));
    $div .= Html::startTag('p', array('class' => 'h3')) . TMS(BaseException::HEADLINE) . Html::endTag('p');
    $div .= Html::startTag('hr');
    $div .= $exception->getMessage();
    $div .= Html::endTag('div');
    print($div);
    if ($exception instanceof BaseException) {
        $exception->debugOut();
    }
}
開發者ID:kafruhs,項目名稱:fws,代碼行數:11,代碼來源:config.php

示例7: display

 /**
  * create a string for output with all header information
  *
  * @param OutputDevice $od
  */
 public function display(OutputDevice $od)
 {
     $header = $this->getDoctypeTag() . "\n";
     $header .= $this->getHtmlTag() . "\n";
     $header .= Html::startTag('head') . "\n";
     $header .= "\t" . $this->getEncodingTag() . "\n";
     $header .= "\t" . $this->getTitleTag() . "\n";
     $header .= "\t" . $this->getDescriptionTag() . "\n";
     $header .= "\t" . $this->getCSSLink();
     $header .= "\t" . $this->getScripts();
     $header .= Html::endTag('head') . "\n";
     $od->addContent($header);
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:18,代碼來源:HeadSection.php

示例8: _shortenContent

    /**
     * @param $content
     * @return string
     */
    private function _shortenContent($content)
    {
        $contentParts = str_split($content, 400);
        $contentShow = $contentParts[0]
            . Html::startTag('span', ['class' => 'show'])
            . '... '
            . Html::url('#', 'mehr', ['class' => 'show'])
            . Html::endTag('span');

        $contentHide = Html::startTag('span', ['class' => 'hide'])
            . $contentParts[1]
            . Html::endTag('span');
        $content = $contentShow . $contentHide;
        return $content;
    }
開發者ID:kafruhs,項目名稱:fws,代碼行數:19,代碼來源:MainPage.php

示例9: getWriteDisplay

 protected function getWriteDisplay()
 {
     $fi = $this->fieldinfo;
     $class = $fi->getConnectedClass();
     $connectedField = $fi->getFieldsOfConnectedClass();
     $objs = Finder::create($class)->find();
     $output = Html::startTag('select', array('class' => $this->class, 'name' => $this->name));
     foreach ($objs as $obj) {
         $params = [];
         $actualFieldValue = $obj[$connectedField];
         if ($this->value == $actualFieldValue) {
             $params['selected'] = 'selected';
         }
         $params['value'] = $obj->getLogicalKey();
         $output .= Html::startTag('option', $params) . $actualFieldValue . Html::endTag('option');
     }
     $output .= Html::endTag('select');
     return $output;
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:19,代碼來源:Lk.php

示例10: getWriteDisplay

    /**
     * show the data in n input element for editing
     *
     * @return string
     */
    protected function getWriteDisplay()
    {
        $params['name'] = $this->getName();
        if (!empty($this->id)) {
            $params['id'] = $this->id;

        }
        if (!empty($this->class)) {
            $params['class'] = $this->class;
        }
        $params['cols'] = $this->cols;
        $params['rows'] = $this->rows;

        $textArea = Html::startTag('textarea', $params);
        if (!empty($this->value)) {
            $textArea .= $this->getValue();
        }
        $textArea .= Html::endTag('textarea');
        return $textArea;

    }
開發者ID:kafruhs,項目名稱:fws,代碼行數:26,代碼來源:SelectionList.php

示例11: label

 public function label($name, $inputName, $attributes = array())
 {
     $id = "label_$inputName";
     $attributes = Html::extendAttributeIfExists('id', $id, $attributes);
     $attributes = Html::extendAttributeIfExists('class', 'label', $attributes);
     $label = Html::startTag('span', $attributes);
     $label .= $name;
     $label .= Html::endTag('span');
     return $label;
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:10,代碼來源:Form.php

示例12: toString

    public function toString()
    {
        $this->attributes['class'] = $this->cssClass;

        if (isset($this->cssID)) {
            $this->attributes['id'] = $this->cssID;
        }

        $table  = Html::startTag('table', $this->attributes);

        if (isset($this->headRow)) {
            $table .= Html::startTag('thead') . $this->headRow->toString() . Html::endTag('thead');
        }

        if (!empty($this->rows)) {
            $table .= Html::startTag('tbody');
            foreach ($this->rows as $row) {
                $table .= $row->toString();
            }
            $table .= Html::endTag('tbody');
        }

        $table .= Html::endTag('table');
        return $table;
    }
開發者ID:kafruhs,項目名稱:fws,代碼行數:25,代碼來源:Table.php

示例13: _displayEntry

 private function _displayEntry(NavigationEntry $entry)
 {
     $string = Html::startTag('li', array('class' => 'naviEntry', 'id' => "entryLK_{$entry->getLogicalKey()}"));
     $string .= Html::url(HTML_ROOT . $entry['url'], $entry['name']);
     $string .= Html::endTag('li');
     return $string;
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:7,代碼來源:Navigation.php

示例14: getReadOnlyDisplay

 /**
  * show the data without input element, because editing is not possible
  *
  * @return string
  */
 protected function getReadOnlyDisplay()
 {
     return Html::startTag('div', array('class' => $this->class. ' formWidth' . $this->displayedLength)) . $this->value . " %" . Html::endTag('div');
 }
開發者ID:kafruhs,項目名稱:fws,代碼行數:9,代碼來源:Percent.php

示例15: require_once

 * User: Alex
 * Date: 12.01.2015
 * Time: 11:54
 */

require_once (dirname(__DIR__) . '/config.php');

$od = new OutputDevice();

base_ui_Site::displayHead($od);
base_ui_Site::displayTop($od);
base_ui_Site::displayNavigation($od);
base_ui_Site::startMainContent($od);

$rh = new RequestHelper();
$controllerClass = $rh->getParam('controller');

/** @var Controller $controller */
$controller = new $controllerClass();

$od->addContent(Html::startTag('h3'));
$od->addContent($controller->getPageTitle());
$od->addContent(Html::endTag('h3'));

$controller->display($od);

base_ui_Site::endMainContent($od);
base_ui_Site::displayBottom($od);

print $od->toString();
開發者ID:kafruhs,項目名稱:fws,代碼行數:30,代碼來源:frontend.php


注:本文中的Html::startTag方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。