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


PHP rex_article::getSiteStartArticleId方法代码示例

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


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

示例1: init

 public static function init()
 {
     self::$domainsByMountId = [];
     self::$domainsByName = [];
     self::$aliasDomains = [];
     self::$paths = [];
     self::addDomain(new rex_yrewrite_domain('undefined', 0, rex_article::getSiteStartArticleId(), rex_article::getNotfoundArticleId()));
     self::$pathfile = rex_path::addonCache('yrewrite', 'pathlist.php');
     self::$configfile = rex_path::addonCache('yrewrite', 'config.php');
     self::readConfig();
     self::readPathFile();
 }
开发者ID:tzfrs,项目名称:redaxo_yrewrite,代码行数:12,代码来源:yrewrite.php

示例2: init

 public static function init()
 {
     if (null === self::$scheme) {
         self::setScheme(new rex_yrewrite_scheme());
     }
     self::$domainsByMountId = [];
     self::$domainsByName = [];
     self::$aliasDomains = [];
     self::$paths = [];
     $path = dirname($_SERVER['SCRIPT_NAME']);
     if (rex::isBackend()) {
         $path = dirname($path);
     }
     $path = rtrim($path, '/') . '/';
     self::addDomain(new rex_yrewrite_domain('default', null, $path, 0, rex_article::getSiteStartArticleId(), rex_article::getNotfoundArticleId()));
     self::$pathfile = rex_path::addonCache('yrewrite', 'pathlist.php');
     self::$configfile = rex_path::addonCache('yrewrite', 'config.php');
     self::readConfig();
     self::readPathFile();
 }
开发者ID:VIEWSION,项目名称:redaxo_yrewrite,代码行数:20,代码来源:yrewrite.php

示例3: isSiteStartArticle

 /**
  * Returns true if this Article is the Startpage for the entire site.
  *
  * @return bool
  */
 public function isSiteStartArticle()
 {
     return $this->id == rex_article::getSiteStartArticleId();
 }
开发者ID:staabm,项目名称:redaxo,代码行数:9,代码来源:structure_element.php

示例4: _deleteArticle

 /**
  * Löscht einen Artikel.
  *
  * @param int $id ArtikelId des Artikels, der gelöscht werden soll
  *
  * @throws rex_api_exception
  *
  * @return string Eine Statusmeldung
  */
 public static function _deleteArticle($id)
 {
     // artikel loeschen
     //
     // kontrolle ob erlaubnis nicht hier.. muss vorher geschehen
     //
     // -> startarticle = 0
     // --> artikelfiles löschen
     // ---> article
     // ---> content
     // ---> clist
     // ---> alist
     // -> startarticle = 1
     // --> rekursiv aufrufen
     if ($id == rex_article::getSiteStartArticleId()) {
         throw new rex_api_exception(rex_i18n::msg('cant_delete_sitestartarticle'));
     }
     if ($id == rex_article::getNotfoundArticleId()) {
         throw new rex_api_exception(rex_i18n::msg('cant_delete_notfoundarticle'));
     }
     $ART = rex_sql::factory();
     $ART->setQuery('select * from ' . rex::getTablePrefix() . 'article where id=? and clang_id=?', [$id, rex_clang::getStartId()]);
     $message = '';
     if ($ART->getRows() > 0) {
         $parent_id = $ART->getValue('parent_id');
         $message = rex_extension::registerPoint(new rex_extension_point('ART_PRE_DELETED', $message, ['id' => $id, 'parent_id' => $parent_id, 'name' => $ART->getValue('name'), 'status' => $ART->getValue('status'), 'priority' => $ART->getValue('priority'), 'path' => $ART->getValue('path'), 'template_id' => $ART->getValue('template_id')]));
         if ($ART->getValue('startarticle') == 1) {
             $message = rex_i18n::msg('category_deleted');
             $SART = rex_sql::factory();
             $SART->setQuery('select * from ' . rex::getTablePrefix() . 'article where parent_id=? and clang_id=?', [$id, rex_clang::getStartId()]);
             for ($i = 0; $i < $SART->getRows(); ++$i) {
                 self::_deleteArticle($id);
                 $SART->next();
             }
         } else {
             $message = rex_i18n::msg('article_deleted');
         }
         rex_article_cache::delete($id);
         $ART->setQuery('delete from ' . rex::getTablePrefix() . 'article where id=' . $id);
         $ART->setQuery('delete from ' . rex::getTablePrefix() . 'article_slice where article_id=' . $id);
         // --------------------------------------------------- Listen generieren
         rex_article_cache::deleteLists($parent_id);
         return $message;
     } else {
         throw new rex_api_exception(rex_i18n::msg('category_doesnt_exist'));
     }
 }
开发者ID:staabm,项目名称:redaxo,代码行数:56,代码来源:service_article.php

示例5: getBreadcrumb

 /**
  * Generiert eine Breadcrumb-Navigation.
  *
  * @param string $startPageLabel Label der Startseite, falls FALSE keine Start-Page anzeigen
  * @param bool   $includeCurrent True wenn der aktuelle Artikel enthalten sein soll, sonst FALSE
  * @param int    $category_id    Id der Wurzelkategorie
  *
  * @return string
  */
 public function getBreadcrumb($startPageLabel, $includeCurrent = false, $category_id = 0)
 {
     if (!$this->_setActivePath()) {
         return false;
     }
     $path = $this->path;
     $i = 1;
     $lis = '';
     if ($startPageLabel) {
         $lis .= '<li class="rex-lvl' . $i . '"><a href="' . rex_getUrl(rex_article::getSiteStartArticleId()) . '">' . htmlspecialchars($startPageLabel) . '</a></li>';
         ++$i;
         // StartArticle nicht doppelt anzeigen
         if (isset($path[0]) && $path[0] == rex_article::getSiteStartArticleId()) {
             unset($path[0]);
         }
     }
     foreach ($path as $pathItem) {
         $cat = rex_category::get($pathItem);
         $lis .= '<li class="rex-lvl' . $i . '"><a href="' . $cat->getUrl() . '">' . htmlspecialchars($cat->getName()) . '</a></li>';
         ++$i;
     }
     if ($includeCurrent) {
         if ($art = rex_article::get($this->current_article_id)) {
             if (!$art->isStartArticle()) {
                 $lis .= '<li class="rex-lvl' . $i . '">' . htmlspecialchars($art->getName()) . '</li>';
             }
         } else {
             $cat = rex_category::get($this->current_article_id);
             $lis .= '<li class="rex-lvl' . $i . '">' . htmlspecialchars($cat->getName()) . '</li>';
         }
     }
     return '<ul class="rex-breadcrumb">' . $lis . '</ul>';
 }
开发者ID:redaxo,项目名称:redaxo,代码行数:42,代码来源:navigation.php

示例6: rex_system_setting_default_template_id

        if (rex_be_controller::getCurrentPagePart(1) == 'content') {
            rex_be_controller::getPageObject('structure')->setIsActive(true);
        }
    });
    if (rex_be_controller::getCurrentPagePart(1) == 'system') {
        rex_system_setting::register(new rex_system_setting_default_template_id());
    }
    rex_extension::register('CLANG_DELETED', function (rex_extension_point $ep) {
        $del = rex_sql::factory();
        $del->setQuery('delete from ' . rex::getTablePrefix() . "article_slice where clang_id='" . $ep->getParam('clang')->getId() . "'");
    });
} else {
    rex_extension::register('FE_OUTPUT', function (rex_extension_point $ep) {
        $content = $ep->getSubject();
        $article = new rex_article_content();
        $article->setCLang(rex_clang::getCurrentId());
        if ($article->setArticleId(rex_article::getCurrentId())) {
            $content .= $article->getArticleTemplate();
        } else {
            $content .= 'Kein Startartikel selektiert / No starting Article selected. Please click here to enter <a href="' . rex_url::backendController() . '">redaxo</a>';
            rex_response::sendPage($content);
            exit;
        }
        $art_id = $article->getArticleId();
        if ($art_id == rex_article::getNotfoundArticleId() && $art_id != rex_article::getSiteStartArticleId()) {
            rex_response::setStatus(rex_response::HTTP_NOT_FOUND);
        }
        // ----- inhalt ausgeben
        rex_response::sendPage($content, $article->getValue('updatedate'));
    });
}
开发者ID:staabm,项目名称:redaxo,代码行数:31,代码来源:boot.php

示例7: elseif

         $tmpl_td = '<td data-title="' . rex_i18n::msg('header_template') . '">' . $template_select->get() . '</td>';
     }
     $echo .= '<tr class="mark">
                 <td class="rex-table-icon"><i class="rex-icon rex-icon-article"></i></td>
                 <td class="rex-table-id" data-title="' . rex_i18n::msg('header_id') . '">-</td>
                 <td data-title="' . rex_i18n::msg('header_article_name') . '"><input class="form-control" type="text" name="article-name" autofocus /></td>
                 ' . $tmpl_td . '
                 <td data-title="' . rex_i18n::msg('header_date') . '">' . rex_formatter::strftime(time(), 'date') . '</td>
                 <td class="rex-table-priority" data-title="' . rex_i18n::msg('header_priority') . '"><input class="form-control" type="text" name="article-position" value="' . ($artPager->getRowCount() + 1) . '" /></td>
                 <td class="rex-table-action" colspan="3"><input type="hidden" name="rex-api-call" value="article_add" /><button class="btn btn-save" type="submit" name="artadd_function"' . rex::getAccesskey(rex_i18n::msg('article_add'), 'save') . '>' . rex_i18n::msg('article_add') . '</button></td>
             </tr>
                         ';
 }
 // --------------------- ARTIKEL LIST
 for ($i = 0; $i < $sql->getRows(); ++$i) {
     if ($sql->getValue('id') == rex_article::getSiteStartArticleId()) {
         $class = ' rex-icon-sitestartarticle';
     } elseif ($sql->getValue('startarticle') == 1) {
         $class = ' rex-icon-startarticle';
     } else {
         $class = ' rex-icon-article';
     }
     $class_startarticle = '';
     if ($sql->getValue('startarticle') == 1) {
         $class_startarticle = ' rex-startarticle';
     }
     // --------------------- ARTIKEL EDIT FORM
     if ($function == 'edit_art' && $sql->getValue('id') == $article_id && $KATPERM) {
         $tmpl_td = '';
         if ($withTemplates) {
             $template_select->setSelected($sql->getValue('template_id'));
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:index.php

示例8: function

 * @var rex_addon $this
 */
rex_perm::register('moveArticle[]', null, rex_perm::OPTIONS);
rex_perm::register('moveCategory[]', null, rex_perm::OPTIONS);
rex_perm::register('copyArticle[]', null, rex_perm::OPTIONS);
rex_perm::register('copyContent[]', null, rex_perm::OPTIONS);
rex_perm::register('publishArticle[]', null, rex_perm::OPTIONS);
rex_perm::register('publishCategory[]', null, rex_perm::OPTIONS);
rex_perm::register('article2startarticle[]', null, rex_perm::OPTIONS);
rex_perm::register('article2category[]', null, rex_perm::OPTIONS);
rex_complex_perm::register('structure', 'rex_structure_perm');
require_once __DIR__ . '/functions/function_rex_url.php';
$this->setProperty('start_article_id', $this->getConfig('start_article_id', 1));
$this->setProperty('notfound_article_id', $this->getConfig('notfound_article_id', 1));
if (rex_request('article_id', 'int') == 0) {
    $this->setProperty('article_id', rex_article::getSiteStartArticleId());
} else {
    $article_id = rex_request('article_id', 'int');
    $article_id = rex_article::get($article_id) ? $article_id : rex_article::getNotfoundArticleId();
    $this->setProperty('article_id', $article_id);
}
if (rex::isBackend() && rex::getUser()) {
    rex_view::addJsFile($this->getAssetsUrl('linkmap.js'));
    rex_extension::register('PAGE_SIDEBAR', function () {
        $category_id = rex_request('category_id', 'int');
        $article_id = rex_request('article_id', 'int');
        $clang = rex_request('clang', 'int');
        $ctype = rex_request('ctype', 'int');
        $category_id = rex_category::get($category_id) ? $category_id : 0;
        $article_id = rex_article::get($article_id) ? $article_id : 0;
        $clang = rex_clang::exists($clang) ? $clang : rex_clang::getStartId();
开发者ID:staabm,项目名称:redaxo,代码行数:31,代码来源:boot.php


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