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


PHP Html::endTag方法代碼示例

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


在下文中一共展示了Html::endTag方法的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: 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

示例5: run

 /**
  * Renders the widget.
  */
 public function run()
 {
     // @todo use [[options]] instead of [[containerOptions]] and introduce [[buttonOptions]] before 2.1 release
     Html::addCssClass($this->containerOptions, ['widget' => 'btn-group']);
     $options = $this->containerOptions;
     $tag = ArrayHelper::remove($options, 'tag', 'div');
     $this->registerPlugin('button');
     return implode("\n", [Html::beginTag($tag, $options), $this->renderButton(), $this->renderDropdown(), Html::endTag($tag)]);
 }
開發者ID:hiqsol,項目名稱:yii2-bootstrap,代碼行數:12,代碼來源:ButtonDropdown.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: _setFilterOptions

    private function _setFilterOptions()
    {
        $form = new base_html_model_Form();
        $output = $form->start('#', 'post', array('id' => 'tableOperations'));

        $output .= Html::startTag('div', array('class' => 'tableOperations'));
        $output .= Html::startTag('div', array('id' => 'sort'));
        $output .= 'Sortieren nach: ';
        $output .= "<select name='sort' onChange='this.form.submit()'>";
        foreach ($this->showColumns as $colName => $colLabel) {
            if ($colName == $this->controller->getFilterParam('sort')) {
                $output .= "<option value='$colName' selected>$colLabel</option>";
            } else {
                $output .= "<option value='$colName'>$colLabel</option>";
            }
        }
        $output .= '</select>';
        $output .= "<select name='direction' onChange='$(\"#tableOperations\").submit()'>";
        $output .= "<option value='" . base_database_Order::ASC . "'>aufsteigend</option>";
        $output .= "<option value='" . base_database_Order::DESC ."'";
        if ($this->controller->getFilterParam('direction') == base_database_Order::DESC) {
            $output .= ' selected';
        }
        $output .= ">absteigend</option>";
        $output .= "</select>";

        $output .= Html::endTag('div');

        $output .= Html::startTag('div', array('class' => 'numberOfData'));
        $output .= 'Einträge ';
        $output .= "<select name='limit' onChange='this.form.submit()'>";
        $limit = $this->controller->getFilterParam('limit');
        foreach (array(10, 25, 50, 100) as $number) {
            if ($number == $limit) {
                $output .= "<option value=$number selected='selected'>$number</option>";
            } else {
                $output .= "<option value=$number>$number</option>";
            }
        }
        $output .= "</select> ";
        $numPages = ceil($this->controller->countData() / $limit);
        $output .= "Seite: " . Html::singleTag('input', array('name' => 'page', 'id' => 'pager', 'size' => 1, 'value' => $this->controller->getFilterParam('page'))) . " / "
            . Html::startTag('span', array('id' => 'numPages')) . $numPages . Html::endTag('span');
        $output .= Html::endTag('div');
        $output .= Html::endTag('div');

        return $output;
    }
開發者ID:kafruhs,項目名稱:fws,代碼行數:48,代碼來源:TableList.php

示例12: _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

示例13: renderLabelParts

 /**
  * @param string|null $label the label or null to use model label
  * @param array $options the tag options
  */
 protected function renderLabelParts($label = null, $options = [])
 {
     $options = array_merge($this->labelOptions, $options);
     if ($label === null) {
         if (isset($options['label'])) {
             $label = $options['label'];
             unset($options['label']);
         } else {
             $attribute = Html::getAttributeName($this->attribute);
             $label = Html::encode($this->model->getAttributeLabel($attribute));
         }
     }
     if (!isset($options['for'])) {
         $options['for'] = Html::getInputId($this->model, $this->attribute);
     }
     $this->parts['{beginLabel}'] = Html::beginTag('label', $options);
     $this->parts['{endLabel}'] = Html::endTag('label');
     if (!isset($this->parts['{labelTitle}'])) {
         $this->parts['{labelTitle}'] = $label;
     }
 }
開發者ID:sx-dev,項目名稱:court,代碼行數:25,代碼來源:ActiveField.php

示例14: showSubmit

    public function showSubmit()
    {
            $save = '';
        if ($this->model->getDisplayMode() == DisplayClass::EDIT) {
            $save .= Html::startTag('div', ['id' => 'editButtons']);
            $action = $this->model->getAction() . '&referer=' . self::SAVE_AND_EDIT;
            $picture = Html::img('buttons/save.png', ['class' => 'button', 'id' => self::SAVE_AND_EDIT]);
//            $save .= Html::url($action, $picture, ['class' => 'submitLink', 'title' => 'Speichern und auf dieser Seite bleiben']);
            $save .= Html::url($action, 'Speichern', ['class' => 'submitLink', 'title' => 'Speichern und auf dieser Seite bleiben']);

            $action = $this->model->getAction() . '&referer=' . self::SAVE_AND_NEW;
            $picture = Html::img('buttons/save_add.png', ['class' => 'button', 'id' => self::SAVE_AND_NEW]);
//            $save .= Html::url($action, $picture, ['class' => 'submitLink', 'title' => 'Datensatz speichern und einen Neuen anlegen']);
            $save .= Html::url($action, 'Speichern und neu', ['class' => 'submitLink', 'title' => 'Datensatz speichern und einen Neuen anlegen']);

            $action = $this->model->getAction() . '&referer=' . self::SAVE_AND_SEARCH;
            $picture = Html::img('buttons/save_go.png', ['class' => 'button', 'id' => self::SAVE_AND_SEARCH]);
//            $save .= Html::url($action, $picture, ['class' => 'submitLink', 'title' => 'Speichern und zur Ergebnisliste']);
            $save .= Html::url($action, 'Speichern und zur Liste', ['class' => 'submitLink', 'title' => 'Speichern und zur Liste']);
            $save .= Html::endTag('div');
        }
        $save .= Html::endTag('form');
        return $save;
    }
開發者ID:kafruhs,項目名稱:fws,代碼行數:24,代碼來源:View.php

示例15: run

 /**
  * Renders the widget.
  */
 public function run()
 {
     $this->registerPlugin('carousel');
     return implode("\n", [Html::beginTag('div', $this->options), $this->renderIndicators(), $this->renderItems(), $this->renderControls(), Html::endTag('div')]) . "\n";
 }
開發者ID:noorafree,項目名稱:makmakan,代碼行數:8,代碼來源:Carousel.php


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