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


PHP rex_fragment类代码示例

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


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

示例1: getNavigation

 /**
  * @return array
  */
 public function getNavigation()
 {
     //$this->setActiveElements();
     $return = [];
     foreach ($this->pages as $block => $blockPages) {
         if (is_array($blockPages) && count($blockPages) > 0 && $blockPages[0] instanceof rex_be_page_main) {
             uasort($blockPages, function (rex_be_page_main $a, rex_be_page_main $b) {
                 $a_prio = (int) $a->getPrio();
                 $b_prio = (int) $b->getPrio();
                 if ($a_prio == $b_prio || $a_prio <= 0 && $b_prio <= 0) {
                     return strcmp($a->getTitle(), $b->getTitle());
                 }
                 if ($a_prio <= 0) {
                     return 1;
                 }
                 if ($b_prio <= 0) {
                     return -1;
                 }
                 return $a_prio > $b_prio ? 1 : -1;
             });
         }
         $n = $this->_getNavigation($blockPages);
         if (count($n) > 0) {
             $fragment = new rex_fragment();
             $fragment->setVar('navigation', $n, false);
             $return[] = ['navigation' => $n, 'headline' => ['title' => $this->getHeadline($block)]];
         }
     }
     return $return;
 }
开发者ID:staabm,项目名称:redaxo,代码行数:33,代码来源:navigation.php

示例2: formatElement

 public function formatElement()
 {
     $s = '';
     $value = $this->getValue();
     $options = $this->getOptions();
     $id = $this->getAttribute('id');
     $attr = '';
     foreach ($this->getAttributes() as $attributeName => $attributeValue) {
         if ($attributeName == 'id') {
             continue;
         }
         $attr .= ' ' . htmlspecialchars($attributeName) . '="' . htmlspecialchars($attributeValue) . '"';
     }
     $formElements = [];
     foreach ($options as $opt_name => $opt_value) {
         $checked = $opt_value == $value ? ' checked="checked"' : '';
         $opt_id = $id . '-' . rex_string::normalize($opt_value, '-');
         $opt_attr = $attr . ' id="' . $opt_id . '"';
         $n = [];
         $n['label'] = '<label class="control-label" for="' . $opt_id . '">' . htmlspecialchars($opt_name) . '</label>';
         $n['field'] = '<input type="radio" value="' . htmlspecialchars($opt_value) . '"' . $opt_attr . $checked . ' />';
         $formElements[] = $n;
     }
     $fragment = new rex_fragment();
     $fragment->setVar('elements', $formElements, false);
     $s = $fragment->parse('core/form/radio.php');
     return $s;
 }
开发者ID:staabm,项目名称:redaxo,代码行数:28,代码来源:radio.php

示例3: formatElement

 public function formatElement()
 {
     $s = '';
     $values = explode('|', trim($this->getValue(), '|'));
     $options = $this->getOptions();
     $name = $this->getAttribute('name');
     $id = $this->getAttribute('id');
     $attr = '';
     foreach ($this->getAttributes() as $attributeName => $attributeValue) {
         if ($attributeName == 'name' || $attributeName == 'id') {
             continue;
         }
         $attr .= ' ' . htmlspecialchars($attributeName) . '="' . htmlspecialchars($attributeValue) . '"';
     }
     $formElements = [];
     foreach ($options as $opt_name => $opt_value) {
         $opt_id = $id;
         if ($opt_value != '') {
             $opt_id .= '-' . rex_string::normalize($opt_value, '-');
         }
         $opt_attr = $attr . ' id="' . htmlspecialchars($opt_id) . '"';
         $checked = in_array($opt_value, $values) ? ' checked="checked"' : '';
         $n = [];
         $n['label'] = '<label class="control-label" for="' . htmlspecialchars($opt_id) . '">' . htmlspecialchars($opt_name) . '</label>';
         $n['field'] = '<input type="checkbox" name="' . htmlspecialchars($name) . '[' . htmlspecialchars($opt_value) . ']" value="' . htmlspecialchars($opt_value) . '"' . $opt_attr . $checked . ' />';
         $formElements[] = $n;
     }
     $fragment = new rex_fragment();
     $fragment->setVar('elements', $formElements, false);
     $fragment->setVar('grouped', true);
     $s = $fragment->parse('core/form/checkbox.php');
     return $s;
 }
开发者ID:staabm,项目名称:redaxo,代码行数:33,代码来源:checkbox.php

示例4: getWidget

 public static function getWidget($id, $name, $value, array $args = [])
 {
     $art_name = '';
     $art = rex_article::get($value);
     $category = 0;
     // Falls ein Artikel vorausgewählt ist, dessen Namen anzeigen und beim öffnen der Linkmap dessen Kategorie anzeigen
     if ($art instanceof rex_article) {
         $art_name = $art->getName();
         $category = $art->getCategoryId();
     }
     $open_params = '&clang=' . rex_clang::getCurrentId();
     if ($category || isset($args['category']) && ($category = (int) $args['category'])) {
         $open_params .= '&category_id=' . $category;
     }
     $class = ' rex-disabled';
     $open_func = '';
     $delete_func = '';
     if (rex::getUser()->getComplexPerm('structure')->hasStructurePerm()) {
         $class = '';
         $open_func = 'openLinkMap(\'REX_LINK_' . $id . '\', \'' . $open_params . '\');';
         $delete_func = 'deleteREXLink(' . $id . ');';
     }
     $e = [];
     $e['field'] = '<input class="form-control" type="text" name="REX_LINK_NAME[' . $id . ']" value="' . htmlspecialchars($art_name) . '" id="REX_LINK_' . $id . '_NAME" readonly="readonly" /><input type="hidden" name="' . $name . '" id="REX_LINK_' . $id . '" value="' . $value . '" />';
     $e['functionButtons'] = '
                     <a href="#" class="btn btn-popup' . $class . '" onclick="' . $open_func . 'return false;" title="' . rex_i18n::msg('var_link_open') . '"><i class="rex-icon rex-icon-open-linkmap"></i></a>
                     <a href="#" class="btn btn-popup' . $class . '" onclick="' . $delete_func . 'return false;" title="' . rex_i18n::msg('var_link_delete') . '"><i class="rex-icon rex-icon-delete-link"></i></a>';
     $fragment = new rex_fragment();
     $fragment->setVar('elements', [$e], false);
     $media = $fragment->parse('core/form/widget.php');
     return $media;
 }
开发者ID:DECAF,项目名称:redaxo,代码行数:32,代码来源:var_link.php

示例5: formatElement

    public function formatElement()
    {
        $name = $this->getAttribute('name') . '[]';
        $value = explode('|', htmlspecialchars($this->getValue()));
        if (count($value) != 4) {
            $value = [null, 1, 'd'];
        }
        $options = ['i' => rex_i18n::msg('cronjob_interval_minutes'), 'h' => rex_i18n::msg('cronjob_interval_hour'), 'd' => rex_i18n::msg('cronjob_interval_day'), 'w' => rex_i18n::msg('cronjob_interval_week'), 'm' => rex_i18n::msg('cronjob_interval_month'), 'y' => rex_i18n::msg('cronjob_interval_year')];
        $items = [];
        $buttonLabel = '';
        foreach ($options as $optionValue => $optionTitle) {
            $item = [];
            $item['title'] = $optionTitle;
            $item['href'] = '#';
            $item['attributes'] = 'data-value="' . $optionValue . '"';
            if ($optionValue == $value[2]) {
                $buttonLabel = $optionTitle;
            }
            $items[] = $item;
        }
        $toolbar = '';
        $fragment = new rex_fragment();
        $fragment->setVar('button_label', $buttonLabel);
        $fragment->setVar('items', $items, false);
        $fragment->setVar('group', true);
        $fragment->setVar('right', true);
        $dropdown = $fragment->parse('core/dropdowns/dropdown.php');
        $formElements = [];
        $n = [];
        $n['field'] = '<input class="form-control" type="text" name="' . $name . '" value="' . $value[1] . '" />';
        $n['right'] = $dropdown;
        $formElements[] = $n;
        $fragment = new rex_fragment();
        $fragment->setVar('elements', $formElements, false);
        $field = '<div class="rex-js-cronjob-interval">' . $fragment->parse('core/form/input_group.php') . '<input class="rex-js-cronjob-interval-value" type="hidden" name="' . $name . '" value="' . $value[2] . '" /></div>';
        $javascript = '
        <script type="text/javascript">
        // <![CDATA[
            jQuery(function($){
                $(".rex-js-cronjob-interval .dropdown-menu li a").click(function(event){
                    event.preventDefault();
                    var $title = $(this).text();
                    $(this).closest(".input-group-btn").find(".btn > b").html($title);

                    var $value = $(this).closest("li").attr("data-value");
                    $(".rex-js-cronjob-interval-value").val($value);
                });
            });
        // ]]>
        </script>';
        return $field . $javascript;
    }
开发者ID:skerbis,项目名称:redaxo,代码行数:52,代码来源:form.php

示例6: extendBackendSlices

 public static function extendBackendSlices(rex_extension_point $ep)
 {
     $Config = rex_config::get('slice_ui');
     $article_id = rex_get('article_id');
     $clang = rex_get('clang');
     $ctype = rex_get('ctype');
     $content = '';
     $Subject = $ep->getSubject();
     if (rex::isBackend() && !empty($Config['online_from_to']) && (in_array($ep->getParam('module_id'), $Config['online_from_to']) || in_array('all', $Config['online_from_to']))) {
         $sql = rex_sql::factory();
         $sql->setTable(rex::getTablePrefix() . 'article_slice');
         $sql->setWhere(array('id' => $ep->getParam('slice_id')));
         $sql->select();
         $online_from = $sql->getValue('online_from');
         $online_to = $sql->getValue('online_to');
         $fragment = new rex_fragment();
         $fragment->setVar('online_from', $online_from ? date('d.m.Y', $online_from) : null, false);
         $fragment->setVar('online_to', $online_to ? date('d.m.Y', $online_to) : null, false);
         $content = $fragment->parse('status/status.php');
     }
     $strContent = rex_extension::registerPoint(new rex_extension_point('EXTEND_SLICE_FORMS', '', ['slice_id' => $ep->getParam('slice_id'), 'article_id' => $ep->getParam('article_id'), 'clang' => $ep->getParam('clang'), 'ctype' => $ep->getParam('ctype'), 'content' => $Subject]));
     if ($strContent) {
         $content .= $strContent;
     }
     if ($content) {
         $fragment = new rex_fragment();
         $fragment->setVar('action', 'index.php?page=content/status&article_id=' . $article_id . '&clang=' . $clang . '&ctype=' . $clang, false);
         $fragment->setVar('slice_id', $ep->getParam('slice_id'), false);
         $fragment->setVar('body', $content, false);
         $content = $fragment->parse('status/slice_form.php');
     }
     $strContent = rex_extension::registerPoint(new rex_extension_point('ADD_AFTER_SLICE_FORMS', '', ['slice_id' => $ep->getParam('slice_id'), 'article_id' => $ep->getParam('article_id'), 'clang' => $ep->getParam('clang'), 'ctype' => $ep->getParam('ctype'), 'content' => $Subject]));
     if ($strContent) {
         $content .= $strContent;
     }
     $Subject = str_replace('<div class="panel-body">', $content . '<div class="panel-body">', $Subject);
     $strContent = rex_extension::registerPoint(new rex_extension_point('ADD_AFTER_SLICE', '', ['slice_id' => $ep->getParam('slice_id'), 'article_id' => $ep->getParam('article_id'), 'clang' => $ep->getParam('clang'), 'ctype' => $ep->getParam('ctype'), 'content' => $Subject]));
     if ($strContent) {
         $fragment = new rex_fragment();
         $fragment->setVar('body', $strContent, false);
         $strContent = $fragment->parse('panel/footer.php');
         $Subject = preg_replace('|(<\\/div>)([^<]*<\\/div>[^<]*<\\/section>[^<]*<\\/li>$)|is', '$1' . $strContent . '$2', $Subject);
     }
     return $Subject;
 }
开发者ID:nilsology,项目名称:slice_ui,代码行数:45,代码来源:slice_ui.php

示例7: getWidget

 public static function getWidget($id, $name, $value, array $args = [])
 {
     $open_params = '&clang=' . rex_clang::getCurrentId();
     if (isset($args['category']) && ($category = (int) $args['category'])) {
         $open_params .= '&amp;category_id=' . $category;
     }
     $options = '';
     $linklistarray = explode(',', $value);
     if (is_array($linklistarray)) {
         foreach ($linklistarray as $link) {
             if ($link != '') {
                 if ($article = rex_article::get($link)) {
                     $options .= '<option value="' . $link . '">' . htmlspecialchars($article->getName()) . '</option>';
                 }
             }
         }
     }
     $disabled = ' disabled';
     $open_func = '';
     $delete_func = '';
     if (rex::getUser()->getComplexPerm('structure')->hasStructurePerm()) {
         $disabled = '';
         $open_func = 'openREXLinklist(' . $id . ', \'' . $open_params . '\');';
         $delete_func = 'deleteREXLinklist(' . $id . ');';
     }
     $e = [];
     $e['field'] = '
             <select class="form-control" name="REX_LINKLIST_SELECT[' . $id . ']" id="REX_LINKLIST_SELECT_' . $id . '" size="10">
                 ' . $options . '
             </select>
             <input type="hidden" name="' . $name . '" id="REX_LINKLIST_' . $id . '" value="' . $value . '" />';
     $e['moveButtons'] = '
                 <a href="#" class="btn btn-popup" onclick="moveREXLinklist(' . $id . ',\'top\');return false;" title="' . rex_i18n::msg('var_linklist_move_top') . '"><i class="rex-icon rex-icon-top"></i></a>
                 <a href="#" class="btn btn-popup" onclick="moveREXLinklist(' . $id . ',\'up\');return false;" title="' . rex_i18n::msg('var_linklist_move_up') . '"><i class="rex-icon rex-icon-up"></i></a>
                 <a href="#" class="btn btn-popup" onclick="moveREXLinklist(' . $id . ',\'down\');return false;" title="' . rex_i18n::msg('var_linklist_move_down') . '"><i class="rex-icon rex-icon-down"></i></a>
                 <a href="#" class="btn btn-popup" onclick="moveREXLinklist(' . $id . ',\'bottom\');return false;" title="' . rex_i18n::msg('var_linklist_move_bottom') . '"><i class="rex-icon rex-icon-bottom"></i></a>';
     $e['functionButtons'] = '
                 <a href="#" class="btn btn-popup" onclick="' . $open_func . 'return false;" title="' . rex_i18n::msg('var_link_open') . '"' . $disabled . '><i class="rex-icon rex-icon-open-linkmap"></i></a>
                 <a href="#" class="btn btn-popup" onclick="' . $delete_func . 'return false;" title="' . rex_i18n::msg('var_link_delete') . '"' . $disabled . '><i class="rex-icon rex-icon-delete-link"></i></a>';
     $fragment = new rex_fragment();
     $fragment->setVar('elements', [$e], false);
     $link = $fragment->parse('core/form/widget_list.php');
     return $link;
 }
开发者ID:staabm,项目名称:redaxo,代码行数:44,代码来源:var_linklist.php

示例8: getWidget

 public static function getWidget($id, $name, $value, array $args = [])
 {
     $open_params = '';
     if (isset($args['category']) && ($category = (int) $args['category'])) {
         $open_params .= '&amp;rex_file_category=' . $category;
     }
     foreach ($args as $aname => $avalue) {
         $open_params .= '&amp;args[' . urlencode($aname) . ']=' . urlencode($avalue);
     }
     $wdgtClass = ' rex-js-widget-media';
     if (isset($args['preview']) && $args['preview']) {
         $wdgtClass .= ' rex-js-widget-preview';
         if (rex_addon::get('media_manager')->isAvailable()) {
             $wdgtClass .= ' rex-js-widget-preview-media-manager';
         }
     }
     $disabled = ' disabled';
     $open_func = '';
     $add_func = '';
     $delete_func = '';
     $view_func = '';
     if (rex::getUser()->getComplexPerm('media')->hasMediaPerm()) {
         $disabled = '';
         $open_func = 'openREXMedia(' . $id . ',\'' . $open_params . '\');';
         $add_func = 'addREXMedia(' . $id . ',\'' . $open_params . '\');';
         $delete_func = 'deleteREXMedia(' . $id . ');';
         $view_func = 'viewREXMedia(' . $id . ',\'' . $open_params . '\');';
     }
     $e = [];
     $e['before'] = '<div class="rex-js-widget' . $wdgtClass . '">';
     $e['field'] = '<input class="form-control" type="text" name="' . $name . '" value="' . $value . '" id="REX_MEDIA_' . $id . '" readonly />';
     $e['functionButtons'] = '
             <a href="#" class="btn btn-popup" onclick="' . $open_func . 'return false;" title="' . rex_i18n::msg('var_media_open') . '"' . $disabled . '><i class="rex-icon rex-icon-open-mediapool"></i></a>
             <a href="#" class="btn btn-popup" onclick="' . $add_func . 'return false;" title="' . rex_i18n::msg('var_media_new') . '"' . $disabled . '><i class="rex-icon rex-icon-add-media"></i></a>
             <a href="#" class="btn btn-popup" onclick="' . $delete_func . 'return false;" title="' . rex_i18n::msg('var_media_remove') . '"' . $disabled . '><i class="rex-icon rex-icon-delete-media"></i></a>
             <a href="#" class="btn btn-popup" onclick="' . $view_func . 'return false;" title="' . rex_i18n::msg('var_media_view') . '"' . $disabled . '><i class="rex-icon rex-icon-view-media"></i></a>';
     $e['after'] = '<div class="rex-js-media-preview"></div></div>';
     $fragment = new rex_fragment();
     $fragment->setVar('elements', [$e], false);
     $media = $fragment->parse('core/form/widget.php');
     return $media;
 }
开发者ID:staabm,项目名称:redaxo,代码行数:42,代码来源:var_media.php

示例9: rex_metainfo_content_sidebar

function rex_metainfo_content_sidebar($extionPointParams)
{
    $params = $extionPointParams->getParams();
    $article = rex_article::get($params['article_id'], $params['clang']);
    $articleStatusTypes = rex_article_service::statusTypes();
    $panel = '';
    $panel .= '<dl class="dl-horizontal">';
    $panel .= '<dt>' . rex_i18n::msg('created_by') . '</dt>';
    $panel .= '<dd>' . $article->getValue('createuser') . '</dd>';
    $panel .= '<dt>' . rex_i18n::msg('created_on') . '</dt>';
    $panel .= '<dd>' . rex_formatter::strftime($article->getValue('createdate'), 'date') . '</dd>';
    $panel .= '<dt>' . rex_i18n::msg('updated_by') . '</dt>';
    $panel .= '<dd>' . $article->getValue('updateuser') . '</dd>';
    $panel .= '<dt>' . rex_i18n::msg('updated_on') . '</dt>';
    $panel .= '<dd>' . rex_formatter::strftime($article->getValue('updatedate'), 'date') . '</dd>';
    $panel .= '<dt>' . rex_i18n::msg('status') . '</dt>';
    $panel .= '<dd class="' . $articleStatusTypes[$article->getValue('status')][1] . '">' . $articleStatusTypes[$article->getValue('status')][0] . '</dd>';
    $panel .= '</dl>';
    $fragment = new rex_fragment();
    $fragment->setVar('title', rex_i18n::msg('metadata'), false);
    $fragment->setVar('body', $panel, false);
    $content = $fragment->parse('core/page/section.php');
    return $content;
}
开发者ID:skerbis,项目名称:redaxo,代码行数:24,代码来源:extension_content_sidebar.php

示例10: showHelpOverview

 public static function showHelpOverview()
 {
     $formats = self::getHelpOverviewFormats();
     $echo = '';
     $echo .= '
         <div class="textile-help-overview">
             <h4>' . rex_i18n::msg('textile_instructions') . '</h4>';
     foreach ($formats as $format) {
         $title = $format[0];
         $content = '';
         $content .= '
             <table class="table">
                 <thead>
                     <tr>
                         <th>' . rex_i18n::msg('textile_input') . '</th>
                         <th>' . rex_i18n::msg('textile_preview') . '</th>
                     </tr>
                 </thead>
                 <tbody>
                      ';
         foreach ($format[1] as $perm => $formats) {
             foreach ($formats as $_format) {
                 $desc = $_format[0];
                 $code = '';
                 if (isset($_format[1])) {
                     $code = $_format[1];
                 }
                 if ($code == '') {
                     $code = $desc;
                 }
                 $code = trim(self::parse($code));
                 $content .= '<tr>
                         <td>' . nl2br(htmlspecialchars($desc)) . '</td>
                         <td>' . $code . '</td>
                     </tr>';
             }
         }
         $content .= '</tbody></table>';
         $fragment = new rex_fragment();
         $fragment->setVar('title', '<i class="rex-icon rex-icon-package-addon"></i> ' . $title, false);
         $fragment->setVar('content', $content, false);
         $fragment->setVar('collapse', true);
         $fragment->setVar('collapsed', true);
         $echo .= $fragment->parse('core/page/section.php');
     }
     $echo .= '</div>';
     echo $echo;
 }
开发者ID:staabm,项目名称:redaxo,代码行数:48,代码来源:textile.php

示例11: getForm

 public static function getForm($field, $label, $output)
 {
     $fragment = new rex_fragment();
     $fragment->setVar('label', $label, false);
     $fragment->setVar('field', $field, false);
     $output = explode(':', $output);
     if ($output[0] == 'form') {
         $labelClass = 'col-md-2';
         $fieldClass = $label == '' ? 'col-md-12' : 'col-md-10';
         if (count($output) == 3) {
             $labelClass = is_numeric($output[1]) ? 'col-md-' . $output[1] : $output[1];
             $fieldClass = is_numeric($output[2]) ? 'col-md-' . $output[2] : $output[2];
         }
         $fragment->setVar('labelClass', $labelClass, false);
         $fragment->setVar('fieldClass', $fieldClass, false);
     }
     return $fragment->parse('dao/form.php');
 }
开发者ID:tbaddade,项目名称:redaxo_dao_var,代码行数:18,代码来源:Dao.php

示例12: rex_fragment

    if ($success != '') {
        $message .= rex_view::success($success);
    }
    if ($error != '') {
        $message .= rex_view::error($error);
    }
    $list = rex_list::factory('SELECT id, name FROM ' . rex::getTablePrefix() . 'module ORDER BY name');
    $list->addTableAttribute('class', 'table-striped table-hover');
    $tdIcon = '<i class="rex-icon rex-icon-module"></i>';
    $thIcon = '<a href="' . $list->getUrl(['function' => 'add']) . '"' . rex::getAccesskey(rex_i18n::msg('create_module'), 'add') . ' title="' . rex_i18n::msg('create_module') . '"><i class="rex-icon rex-icon-add-module"></i></a>';
    $list->addColumn($thIcon, $tdIcon, 0, ['<th class="rex-table-icon">###VALUE###</th>', '<td class="rex-table-icon">###VALUE###</td>']);
    $list->setColumnParams($thIcon, ['function' => 'edit', 'module_id' => '###id###']);
    $list->setColumnLabel('id', rex_i18n::msg('id'));
    $list->setColumnLayout('id', ['<th class="rex-table-id">###VALUE###</th>', '<td class="rex-table-id" data-title="' . rex_i18n::msg('id') . '">###VALUE###</td>']);
    $list->setColumnLabel('name', rex_i18n::msg('module_description'));
    $list->setColumnParams('name', ['function' => 'edit', 'module_id' => '###id###']);
    $list->addColumn(rex_i18n::msg('module_functions'), '<i class="rex-icon rex-icon-edit"></i> ' . rex_i18n::msg('edit'));
    $list->setColumnLayout(rex_i18n::msg('module_functions'), ['<th class="rex-table-action" colspan="2">###VALUE###</th>', '<td class="rex-table-action">###VALUE###</td>']);
    $list->setColumnParams(rex_i18n::msg('module_functions'), ['function' => 'edit', 'module_id' => '###id###']);
    $list->addColumn(rex_i18n::msg('delete_module'), '<i class="rex-icon rex-icon-delete"></i> ' . rex_i18n::msg('delete'));
    $list->setColumnLayout(rex_i18n::msg('delete_module'), ['', '<td class="rex-table-action">###VALUE###</td>']);
    $list->setColumnParams(rex_i18n::msg('delete_module'), ['function' => 'delete', 'module_id' => '###id###']);
    $list->addLinkAttribute(rex_i18n::msg('delete_module'), 'data-confirm', rex_i18n::msg('confirm_delete_module'));
    $list->setNoRowsMessage(rex_i18n::msg('modules_not_found'));
    $content .= $list->get();
    echo $message;
    $fragment = new rex_fragment();
    $fragment->setVar('title', rex_i18n::msg('module_caption'), false);
    $fragment->setVar('content', $content, false);
    echo $fragment->parse('core/page/section.php');
}
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:modules.modules.php

示例13: foreach

// Variable definiert und vorbelegt wenn nicht existent
$KAToutARR = [];
// Variable definiert und vorbelegt wenn nicht existent
$navigation = [];
$object_id = $article_id > 0 ? $article_id : $category_id;
$object = rex_article::get($object_id, $clang);
if ($object) {
    $tree = $object->getParentTree();
    if (!$object->isStartarticle()) {
        $tree[] = $object;
    }
    foreach ($tree as $parent) {
        $id = $parent->getId();
        if (rex::getUser()->getComplexPerm('structure')->hasCategoryPerm($id)) {
            $n = [];
            $n['title'] = str_replace(' ', '&nbsp;', htmlspecialchars($parent->getName()));
            if ($parent->isStartarticle()) {
                $n['href'] = rex_url::backendPage('structure', ['category_id' => $id, 'clang' => $clang]);
            }
            $navigation[] = $n;
        }
    }
}
$title = '<a href="' . rex_url::backendPage('structure', ['category_id' => 0, 'clang' => $clang]) . '"><i class="rex-icon rex-icon-sitestartarticle"></i> ' . rex_i18n::msg('homepage') . '</a>';
$fragment = new rex_fragment();
$fragment->setVar('id', 'rex-js-structure-breadcrumb', false);
$fragment->setVar('title', $title, false);
$fragment->setVar('items', $navigation, false);
echo $fragment->parse('core/navigations/breadcrumb.php');
unset($fragment);
unset($navigation);
开发者ID:staabm,项目名称:redaxo,代码行数:31,代码来源:function_rex_category.php

示例14: rex_fragment

<?php

echo rex_view::title('yform');
$fragment = new rex_fragment();
$fragment->setVar('class', 'info');
$fragment->setVar('title', rex_i18n::msg('yform_description_title'), false);
$fragment->setVar('body', rex_i18n::rawMsg('yform_description_all', false) . rex_yform::showHelp(true, true), false);
echo $fragment->parse('core/page/section.php');
开发者ID:xong,项目名称:redaxo_yform,代码行数:8,代码来源:overview.php

示例15: rex_fragment

                    <tr class="rex-state-' . $class . '">
                        <td data-title="' . rex_i18n::msg('syslog_timestamp') . '">' . $entry->getTimestamp('%d.%m.%Y %H:%M:%S') . '</td>
                        <td data-title="' . rex_i18n::msg('syslog_type') . '">' . $data[0] . '</td>
                        <td data-title="' . rex_i18n::msg('syslog_message') . '">' . $data[1] . '</td>
                        <td data-title="' . rex_i18n::msg('syslog_file') . '"><span class="rex-truncate rex-truncate-left">' . (isset($data[2]) ? $data[2] : '') . '</span></td>
                        <td class="rex-table-number" data-title="' . rex_i18n::msg('syslog_line') . '">' . (isset($data[3]) ? $data[3] : '') . '</td>
                    </tr>';
    }
}
$content .= '
                </tbody>
            </table>';
$formElements = [];
$n = [];
$n['field'] = '<button class="btn btn-delete" type="submit" name="del_btn" data-confirm="' . rex_i18n::msg('delete') . '?">' . rex_i18n::msg('syslog_delete') . '</button>';
$formElements[] = $n;
$fragment = new rex_fragment();
$fragment->setVar('elements', $formElements, false);
$buttons = $fragment->parse('core/form/submit.php');
$fragment = new rex_fragment();
$fragment->setVar('title', rex_i18n::msg('syslog'), false);
$fragment->setVar('content', $content, false);
$fragment->setVar('buttons', $buttons, false);
$content = $fragment->parse('core/page/section.php');
$content = '
    <form action="' . rex_url::currentBackendPage() . '" method="post">
        <input type="hidden" name="func" value="delLog" />
        ' . $content . '
    </form>';
echo $message;
echo $content;
开发者ID:eaCe,项目名称:redaxo,代码行数:31,代码来源:system.log.php


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