当前位置: 首页>>代码示例>>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;未经允许,请勿转载。