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


PHP Area::getHandleList方法代码示例

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


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

示例1: view

 public function view($updated = false)
 {
     Loader::library('database_indexed_search');
     if ($this->post('reindex')) {
         IndexedSearch::clearSearchIndex();
         $this->redirect('/dashboard/system/seo/search_index', 'index_cleared');
     } else {
         if ($updated) {
             $this->set('message', t('Search Index Preferences Updated'));
         }
         if ($this->isPost()) {
             if ($this->token->validate('update_search_index')) {
                 $areas = $this->post('arHandle');
                 if (!is_array($areas)) {
                     $areas = array();
                 }
                 Config::save('SEARCH_INDEX_AREA_LIST', serialize($areas));
                 Config::save('SEARCH_INDEX_AREA_METHOD', Loader::helper('security')->sanitizeString($this->post('SEARCH_INDEX_AREA_METHOD')));
                 $this->redirect('/dashboard/system/seo/search_index', 'updated');
             } else {
                 $this->set('error', array($this->token->getErrorMessage()));
             }
         }
         $areas = Area::getHandleList();
         $selectedAreas = array();
         $this->set('areas', $areas);
         $this->set('selectedAreas', IndexedSearch::getSavedSearchableAreas());
     }
 }
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:29,代码来源:search_index.php

示例2: getBodyContentFromPage

 public function getBodyContentFromPage($c)
 {
     $searchableAreaNamesInitial = $this->getSavedSearchableAreas();
     foreach ($this->searchableAreaNamesManual as $sm) {
         $searchableAreaNamesInitial[] = $sm;
     }
     $searchableAreaNames = array();
     if ($this->getSearchableAreaAction() == 'blacklist') {
         $areas = Area::getHandleList();
         foreach ($areas as $arHandle) {
             if (!in_array($arHandle, $searchableAreaNamesInitial)) {
                 $searchableAreaNames[] = $arHandle;
             }
         }
     } else {
         $searchableAreaNames = $searchableAreaNamesInitial;
     }
     if (count($searchableAreaNames) == 0) {
         return false;
     }
     $text = '';
     $tagsToSpaces = array('<br>', '<br/>', '<br />', '<p>', '</p>', '</ p>', '<div>', '</div>', '</ div>', '&nbsp;');
     $blarray = array();
     $db = Loader::db();
     $r = $db->Execute('select bID, arHandle from CollectionVersionBlocks where cID = ? and cvID = ?', array($c->getCollectionID(), $c->getVersionID()));
     $th = Loader::helper('text');
     while ($row = $r->FetchRow()) {
         if (in_array($row['arHandle'], $searchableAreaNames)) {
             $b = Block::getByID($row['bID'], $c, $row['arHandle']);
             if (!is_object($b)) {
                 continue;
             }
             $bi = $b->getInstance();
             $bi->bActionCID = $c->getCollectionID();
             if (method_exists($bi, 'getSearchableContent')) {
                 $searchableContent = $bi->getSearchableContent();
                 if (strlen(trim($searchableContent))) {
                     $text .= $th->decodeEntities(strip_tags(str_ireplace($tagsToSpaces, ' ', $searchableContent)), ENT_QUOTES, APP_CHARSET) . ' ';
                 }
             }
             unset($b);
             unset($bi);
         }
     }
     $returned_text = Events::fire('on_page_body_index', $c, $text);
     if ($returned_text !== null && $returned_text !== false) {
         $text = $returned_text;
     }
     return $text;
 }
开发者ID:Zyqsempai,项目名称:amanet,代码行数:50,代码来源:indexed_search.php

示例3: manage_index

 public function manage_index()
 {
     Loader::library('database_indexed_search');
     if ($this->isPost()) {
         $areas = $this->post('arHandle');
         if (!is_array($areas)) {
             $areas = array();
         }
         Config::save('SEARCH_INDEX_AREA_LIST', serialize($areas));
         Config::save('SEARCH_INDEX_AREA_METHOD', $this->post('SEARCH_INDEX_AREA_METHOD'));
         $this->redirect('/dashboard/sitemap/search', 'index_settings_updated');
     }
     $areas = Area::getHandleList();
     $selectedAreas = array();
     $this->set('areas', $areas);
     $this->set('selectedAreas', IndexedSearch::getSavedSearchableAreas());
 }
开发者ID:VonUniGE,项目名称:concrete5-1,代码行数:17,代码来源:search.php


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