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


PHP FinderIndexerHelper::prepareContent方法代码示例

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


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

示例1: index

 protected function index(FinderIndexerResult $item, $format = 'html')
 {
     // Check if the extension is enabled
     if (JComponentHelper::isEnabled($this->extension) == false) {
         return;
     }
     $item->body = FinderIndexerHelper::prepareContent($item->getElement('body'));
     $item->summary = FinderIndexerHelper::prepareContent($item->getElement('body'));
     $item->addTaxonomy('Type', 'FSF_FINDER_GLOSSARY');
     $word = $item->title;
     $anchor = strtolower(preg_replace("/[^A-Za-z0-9]/", '-', $word));
     $letter = strtolower(substr($word, 0, 1));
     $item->url = 'index.php?option=com_fsf&view=glossary&letter=' . $letter . '#' . $anchor;
     $item->route = $item->url;
     $item->state = $item->published;
     $item->access = 1;
     // Get content extras.
     FinderIndexerHelper::getContentExtras($item);
     // Index the item.
     if (FSFJ3Helper::IsJ3()) {
         $this->indexer->index($item);
     } else {
         FinderIndexer::index($item);
     }
 }
开发者ID:sansandeep143,项目名称:av,代码行数:25,代码来源:fsf_glossary.php

示例2: _index

 /**
  * Method to index an item. The item must be a FinderIndexerResult object.
  *
  * @param	object		The item to index as an FinderIndexerResult object.
  * @throws	Exception on database error.
  */
 protected function _index(FinderIndexerResult $item)
 {
     // Build the necessary route and path information.
     $item->url = $this->_getURL($item->topic);
     $item->itemid = '100065';
     $item->route = $item->url . '&post=' . $item->id . '&Itemid=' . $item->itemid . '#p' . $item->id;
     $item->path = FinderIndexerHelper::getContentPath($item->route);
     // Add the meta-data processing instructions.
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'display_name');
     // Strip slashes!
     $item->title = stripslashes($item->title);
     $item->summary = stripslashes($item->summary);
     $item->display_name = stripslashes($item->display_name);
     $item->text = FinderIndexerHelper::prepareContent($item->summary);
     // Translate the access group to an access level.
     //$item->cat_access = $this->_getAccessLevel($item->cat_access);
     // Inherit state and access form the category.
     $item->state = 1;
     $item->access = 0;
     // Set the language.
     $item->language = FinderIndexerHelper::getDefaultLanguage();
     // Add the type taxonomy data.
     $item->addTaxonomy('Type', 'Forum Post');
     // Add the author taxonomy data.
     if (!empty($item->author)) {
         $item->addTaxonomy('Forum User', $item->display_name);
     }
     // Index the item.
     FinderIndexer::index($item);
 }
开发者ID:ravenlife,项目名称:Ninjaboard,代码行数:36,代码来源:ninjaboard_posts.php

示例3: index

 protected function index(FinderIndexerResult $item, $format = 'html')
 {
     // Check if the extension is enabled
     if (JComponentHelper::isEnabled($this->extension) == false) {
         return;
     }
     $item->body = FinderIndexerHelper::prepareContent($item->getElement('body'));
     $item->summary = FinderIndexerHelper::prepareContent($item->getElement('body'));
     $item->addTaxonomy('Type', 'FSS_FINDER_KB_ARTICLE');
     $item->url = 'index.php?option=com_fss&view=kb&kbartid=' . $item->getElement('id');
     $item->route = $item->url;
     $item->state = $item->getElement('pub');
     // Get content extras.
     FinderIndexerHelper::getContentExtras($item);
     // Index the item.
     if (FSSJ3Helper::IsJ3()) {
         $this->indexer->index($item);
     } else {
         FinderIndexer::index($item);
     }
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:21,代码来源:fss_kb.php

示例4: index

 /**
  * Method to index an item. The item must be a FinderIndexerResult object.
  *
  * @param   FinderIndexerResult  $item    The item to index as an FinderIndexerResult object.
  * @param   string               $format  The item format
  *
  * @return  void
  *
  * @since   2.5
  * @throws  Exception on database error.
  */
 protected function index(FinderIndexerResult $item, $format = 'html')
 {
     // Check if the extension is enabled
     if (JComponentHelper::isEnabled($this->extension) == false) {
         return;
     }
     // Need to import component route helpers dynamically, hence the reason it's handled here
     if (JFile::exists(JPATH_SITE . '/components/' . $item->extension . '/helpers/route.php')) {
         include_once JPATH_SITE . '/components/' . $item->extension . '/helpers/route.php';
     }
     $extension = ucfirst(substr($item->extension, 4));
     // Initialize the item parameters.
     $registry = new JRegistry();
     $registry->loadString($item->params);
     $item->params = $registry;
     $registry = new JRegistry();
     $registry->loadString($item->metadata);
     $item->metadata = $registry;
     /* Add the meta-data processing instructions based on the categories
      * configuration parameters.
      */
     // Add the meta-author.
     $item->metaauthor = $item->metadata->get('author');
     // Handle the link to the meta-data.
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'link');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metakey');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metadesc');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metaauthor');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'author');
     //$item->addInstruction(FinderIndexer::META_CONTEXT, 'created_by_alias');
     // Trigger the onContentPrepare event.
     $item->summary = FinderIndexerHelper::prepareContent($item->summary, $item->params);
     // Build the necessary route and path information.
     $item->url = $this->getURL($item->id, $item->extension, $this->layout);
     $class = $extension . 'HelperRoute';
     if (class_exists($class) && method_exists($class, 'getCategoryRoute')) {
         $item->route = $class::getCategoryRoute($item->id);
     } else {
         $item->route = ContentHelperRoute::getCategoryRoute($item->slug, $item->catid);
     }
     $item->path = FinderIndexerHelper::getContentPath($item->route);
     // Get the menu title if it exists.
     $title = $this->getItemMenuTitle($item->url);
     // Adjust the title if necessary.
     if (!empty($title) && $this->params->get('use_menu_title', true)) {
         $item->title = $title;
     }
     // Translate the state. Categories should only be published if the parent category is published.
     $item->state = $this->translateState($item->state);
     // Add the type taxonomy data.
     $item->addTaxonomy('Type', 'Category');
     // Add the language taxonomy data.
     $item->addTaxonomy('Language', $item->language);
     // Get content extras.
     FinderIndexerHelper::getContentExtras($item);
     // Index the item.
     FinderIndexer::index($item);
 }
开发者ID:exntu,项目名称:joomla-cms,代码行数:69,代码来源:categories.php

示例5: index

 /**
  * Method to index an item. The item must be a FinderIndexerResult object.
  *
  * @param   FinderIndexerResult  $item    The item to index as an FinderIndexerResult object.
  * @param   string               $format  The item format.  Not used.
  *
  * @return  void
  *
  * @since   2.5
  * @throws  Exception on database error.
  */
 protected function index(FinderIndexerResult $item, $format = 'html')
 {
     $item->setLanguage();
     // Check if the extension is enabled.
     if (JComponentHelper::isEnabled($this->extension) == false) {
         return;
     }
     // Initialise the item parameters.
     $registry = new JRegistry();
     $registry->loadString($item->params);
     $item->params = JComponentHelper::getParams('com_content', true);
     $item->params->merge($registry);
     $registry = new JRegistry();
     $registry->loadString($item->metadata);
     $item->metadata = $registry;
     // Trigger the onContentPrepare event.
     $item->summary = FinderIndexerHelper::prepareContent($item->summary, $item->params);
     $item->body = FinderIndexerHelper::prepareContent($item->body, $item->params);
     // Build the necessary route and path information.
     $item->url = $this->getURL($item->id, $this->extension, $this->layout);
     $item->route = ContentHelperRoute::getArticleRoute($item->slug, $item->catslug, $item->language);
     $item->path = FinderIndexerHelper::getContentPath($item->route);
     // Get the menu title if it exists.
     $title = $this->getItemMenuTitle($item->url);
     // Adjust the title if necessary.
     if (!empty($title) && $this->params->get('use_menu_title', true)) {
         $item->title = $title;
     }
     // Add the meta-author.
     $item->metaauthor = $item->metadata->get('author');
     // Add the meta-data processing instructions.
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metakey');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metadesc');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metaauthor');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'author');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'created_by_alias');
     // Translate the state. Articles should only be published if the category is published.
     $item->state = $this->translateState($item->state, $item->cat_state);
     // Add the type taxonomy data.
     $item->addTaxonomy('Type', 'Article');
     // Add the author taxonomy data.
     if (!empty($item->author) || !empty($item->created_by_alias)) {
         $item->addTaxonomy('Author', !empty($item->created_by_alias) ? $item->created_by_alias : $item->author);
     }
     // Add the category taxonomy data.
     $item->addTaxonomy('Category', $item->category, $item->cat_state, $item->cat_access);
     // Add the language taxonomy data.
     $item->addTaxonomy('Language', $item->language);
     // Get content extras.
     FinderIndexerHelper::getContentExtras($item);
     // Index the item.
     $this->indexer->index($item);
 }
开发者ID:01J,项目名称:topm,代码行数:64,代码来源:content.php

示例6: index

 /**
  * Method to index an item. The item must be a FinderIndexerResult object.
  *
  * @param   FinderIndexerResult  $item    The item to index as an FinderIndexerResult object.
  * @param   string               $format  The item format
  *
  * @return  void
  *
  * @throws  Exception on database error.
  */
 protected function index(FinderIndexerResult $item, $format = 'html')
 {
     $item->setLanguage();
     // Check if the extension is enabled
     if (JComponentHelper::isEnabled($this->extension) == false) {
         return;
     }
     // Initialize the item parameters.
     $registry = new Registry();
     $registry->loadString($item->params);
     $item->params = JComponentHelper::getParams('com_knvbapi2', true);
     $item->params->merge($registry);
     $registry = null;
     //release memory
     $registry = new Registry();
     $registry->loadString($item->metadata);
     $item->metadata = $registry;
     $registry = null;
     //release memory
     // Trigger the onContentPrepare event.
     $item->summary = FinderIndexerHelper::prepareContent($item->summary, $item->params);
     $item->body = FinderIndexerHelper::prepareContent($item->body, $item->params);
     if ($this->sub_layout != 'default') {
         $view = $this->layout . '&layout=' . $this->sub_layout;
     } else {
         $view = $this->layout;
     }
     // Build the necessary route and path information.
     $item->url = $this->getURL($item->id, $this->extension, $view);
     $item->route = Knvbapi2HelperRoute::getTeamidRoute($item->slug, $item->language, $this->sub_layout);
     $item->path = FinderIndexerHelper::getContentPath($item->route);
     // Get the menu title if it exists.
     $title = $this->getItemMenuTitle($item->url);
     if (!empty($title) and $this->params->get('use_menu_title', true)) {
         $item->title = $title;
     } else {
         $item->title = $item->name;
     }
     // Add the meta-data processing instructions.
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metakey');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metadesc');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'created_by_name');
     // Translate the state.
     $item->state = $this->translateState($item->state);
     // Add the type taxonomy data.
     $item->addTaxonomy('Type', 'Teamid');
     // Add the created_by taxonomy data.
     if (!empty($item->created_by_alias)) {
         $item->addTaxonomy('Author', !empty($item->created_by_name) ? $item->created_by_name : $item->created_by);
     }
     // Add the language taxonomy data.
     $item->addTaxonomy('Language', $item->language);
     // Get content extras.
     FinderIndexerHelper::getContentExtras($item);
     // Index the item.
     $this->indexer->index($item);
 }
开发者ID:esorone,项目名称:efcpw,代码行数:67,代码来源:teamids.php

示例7: index

 /**
  * Method to index an item. The item must be a FinderIndexerResult object.
  *
  * @param   FinderIndexerResult  $item    The item to index as an FinderIndexerResult object.
  * @param   string               $format  The item format
  *
  * @return  void
  *
  * @since   2.5
  * @throws  Exception on database error.
  */
 protected function index(FinderIndexerResult $item, $format = 'html')
 {
     // Check if the extension is enabled
     if (JComponentHelper::isEnabled($this->extension) == false) {
         return;
     }
     // Initialize the item parameters.
     $registry = new JRegistry();
     $registry->loadString($item->params);
     $item->params = JComponentHelper::getParams('com_jshopping', true);
     $item->params->merge($registry);
     // Trigger the onContentPrepare event.
     $item->summary = FinderIndexerHelper::prepareContent($item->summary, $item->params);
     $item->body = FinderIndexerHelper::prepareContent($item->body, $item->params);
     // Build the necessary route and path information.
     $item->url = 'index.php?option=com_jshopping&controller=product&task=view&category_id=' . $item->category_id . '&product_id=' . $item->product_id;
     $item->route = 'index.php?option=com_jshopping&controller=product&task=view&category_id=' . $item->category_id . '&product_id=' . $item->product_id;
     $item->path = FinderIndexerHelper::getContentPath($item->route);
     // Get the menu title if it exists.
     $title = $this->getItemMenuTitle($item->url);
     // Adjust the title if necessary.
     if (!empty($title) && $this->params->get('use_menu_title', true)) {
         $item->title = $title;
     }
     // Add the meta-author.
     // Add the meta-data processing instructions.
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metakey');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metadesc');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'link');
     // Add the type taxonomy data.
     $item->addTaxonomy('Type', 'Product');
     // Add the category taxonomy data.
     $item->addTaxonomy('Category', $item->category, $item->cat_state, $item->cat_access);
     // Get content extras.
     FinderIndexerHelper::getContentExtras($item);
     // Index the item.
     if (version_compare(JVERSION, '3.0.0', 'ge')) {
         $this->indexer->index($item);
     } else {
         FinderIndexer::index($item);
     }
 }
开发者ID:Tommar,项目名称:vino2,代码行数:53,代码来源:jshopping.php

示例8: index

 /**
  * Method to index an item. The item must be a FinderIndexerResult object.
  *
  * @param   FinderIndexerResult  $item    The item to index as an FinderIndexerResult object.
  * @param   string               $format  The item format
  *
  * @return  void
  *
  * @since   2.5
  * @throws  Exception on database error.
  */
 protected function index(FinderIndexerResult $item, $format = 'html')
 {
     // Check if the extension is enabled
     if (JComponentHelper::isEnabled($this->extension) == false) {
         return;
     }
     // Initialize the item parameters.
     $registry = new JRegistry();
     $registry->loadString($item->params);
     $item->params = JComponentHelper::getParams('com_jevents', true);
     $item->params->merge($registry);
     $registry = new JRegistry();
     $registry->loadString($item->metadata);
     $item->metadata = $registry;
     // Trigger the onContentPrepare event.
     $item->summary = FinderIndexerHelper::prepareContent($item->summary, $item->params);
     $item->body = FinderIndexerHelper::prepareContent($item->body, $item->params);
     // Build the necessary route and path information.
     $itemid = $this->params->get("target_itemid", 0);
     $item->url = "index.php?option=com_jevents&task=icalevent.detail&evid=" . $item->eventid . "&Itemid=" . $itemid;
     //$this->getURL($item->id, $this->extension, $this->layout);
     $item->route = "index.php?option=com_jevents&task=icalevent.detail&evid=" . $item->eventid . "&Itemid=" . $itemid;
     $item->path = FinderIndexerHelper::getContentPath($item->route);
     // title is already set
     //$item->title;
     // Events should only be published if the category is published.etc. - do this later
     //$item->state;
     // Add the type taxonomy data.
     $item->addTaxonomy('Type', 'Event');
     // Add the creator taxonomy data.
     if (!empty($item->creator) || !empty($item->created_by_alias)) {
         $item->addTaxonomy('Creator', !empty($item->created_by_alias) ? $item->created_by_alias : $item->creator);
     }
     // Add the category taxonomy data. - can we do multiple categories?
     $item->addTaxonomy('Category', $item->category, $item->cat_state, $item->cat_access);
     // Add the language taxonomy data.
     //$item->addTaxonomy('Language', $item->language);
     // Get jevents extras.
     FinderIndexerHelper::getContentExtras($item);
     // Index the item.
     if (JevJoomlaVersion::isCompatible("3.0.0")) {
         $this->indexer->index($item);
     } else {
         FinderIndexer::index($item);
     }
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:57,代码来源:jevents.php

示例9: index

 protected function index(FinderIndexerResult $item, $format = 'html')
 {
     // Check if the extension is enabled
     if (JComponentHelper::isEnabled($this->extension) == false) {
         return;
     }
     // Initialize the item parameters.
     $registry = new JRegistry();
     $registry->loadString($item->params);
     $item->params = JComponentHelper::getParams('com_virtuemart', true);
     $item->params->merge($registry);
     $registry = new JRegistry();
     $registry->loadString($item->metadata);
     $item->metadata = $registry;
     // Trigger the onContentPrepare event.
     $item->summary = FinderIndexerHelper::prepareContent($item->summary, $item->params);
     $item->body = FinderIndexerHelper::prepareContent($item->body, $item->params);
     // Build the necessary route and path information.
     $item->url = "index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=206&virtuemart_product_id=" . $item->id;
     $item->route = "index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=206&virtuemart_product_id=" . $item->id;
     $item->path = FinderIndexerHelper::getContentPath($item->route);
     // Get the menu title if it exists.
     $title = $this->getItemMenuTitle($item->url);
     // Adjust the title if necessary.
     if (!empty($title) && $this->params->get('use_menu_title', true)) {
         $item->title = $title;
     }
     // Add the meta-author.
     $item->metaauthor = $item->metadata->get('author');
     // Add the meta-data processing instructions.
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metakey');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metadesc');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metaauthor');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'author');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'created_by_alias');
     // Translate the state. Articles should only be published if the category is published.
     $item->state = 1;
     $item->cat_state = 1;
     $item->cat_access = 1;
     $item->access = 1;
     // Add the type taxonomy data.
     $item->addTaxonomy('Type', 'VM Product');
     // Add the category taxonomy data.
     $item->addTaxonomy('Category', $item->category, 1, 1);
     // Add the language taxonomy data.
     $item->addTaxonomy('Language', $item->language);
     // Get content extras.
     FinderIndexerHelper::getContentExtras($item);
     // Index the item.
     $this->indexer->index($item);
 }
开发者ID:sanderpotjer,项目名称:Smart-Search-Virtuemart-Product,代码行数:51,代码来源:vmproducts.php

示例10: index

 /**
  * Method to index an item. The item must be a FinderIndexerResult object.
  *
  * @param   FinderIndexerResult  $item    The item to index as an FinderIndexerResult object.
  * @param   string               $format  The item format.  Not used.
  *
  * @return  void
  *
  * @since   2.5
  * @throws  Exception on database error.
  */
 protected function index(FinderIndexerResult $item, $format = 'html')
 {
     $item->setLanguage();
     // Check if the extension is enabled.
     if (JComponentHelper::isEnabled($this->extension) == false) {
         return;
     }
     // Initialise the item parameters.
     $registry = new JRegistry();
     $registry->loadString($item->params);
     $item->params = JComponentHelper::getParams('com_j2store', true);
     $item->params->merge($registry);
     $registry = new JRegistry();
     $registry->loadString($item->metadata);
     $item->metadata = $registry;
     // Trigger the onContentPrepare event.
     $item->summary = FinderIndexerHelper::prepareContent($item->summary, $item->params);
     $item->body = FinderIndexerHelper::prepareContent($item->body, $item->params);
     //let us get the redirect choice
     if ($this->params->get('redirect_to', 'j2store') == 'article') {
         // Build the necessary route and path information.
         $item->url = $this->getURL($item->id, $this->extension, $this->layout);
         $item->route = ContentHelperRoute::getArticleRoute($item->slug, $item->catslug, $item->language);
         $item->path = FinderIndexerHelper::getContentPath($item->route);
     } else {
         $menu_id = $this->params->get('menuitem_id');
         $item->url = $this->getJ2StoreURL($item->j2store_product_id, $this->extension, $this->layout);
         $item->route = 'index.php?option=com_j2store&view=products&task=view&id=' . $item->j2store_product_id . '&Itemid=' . $menu_id;
         $item->path = FinderIndexerHelper::getContentPath($item->route);
     }
     // Get the menu title if it exists.
     $title = $this->getItemMenuTitle($item->url);
     // Adjust the title if necessary.
     if (!empty($title) && $this->params->get('use_menu_title', true)) {
         $item->title = $title;
     }
     // Add the meta-author.
     $item->metaauthor = $item->metadata->get('author');
     // Add the meta-data processing instructions.
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metakey');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metadesc');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'metaauthor');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'author');
     $item->addInstruction(FinderIndexer::META_CONTEXT, 'created_by_alias');
     // Translate the state. Articles should only be published if the category is published.
     $item->state = $this->translateState($item->state, $item->cat_state);
     // Add the type taxonomy data.
     $item->addTaxonomy('Type', $this->type_title);
     // Add the author taxonomy data.
     if (!empty($item->author) || !empty($item->created_by_alias)) {
         $item->addTaxonomy('Author', !empty($item->created_by_alias) ? $item->created_by_alias : $item->author);
     }
     // Add the category taxonomy data.
     $item->addTaxonomy('J2Store Category', $item->category, $item->cat_state, $item->cat_access);
     $brandmodel = F0FModel::getTmpInstance('Manufacturers', 'J2StoreModel');
     $brandmodel->enabled(1);
     FinderIndexerHelper::getContentExtras($item);
     // Add the Brand taxonomy data.
     $item->addTaxonomy('J2Store Brand', $item->brand);
     // Index the item.
     $this->indexer->index($item);
 }
开发者ID:davetheapple,项目名称:oakencraft,代码行数:73,代码来源:j2store.php

示例11: getFinderItem

 /**
  * Turns a KModelEntityInterface object into a finder item
  *
  * @param KModelEntityInterface $entity
  * @return object
  */
 protected function getFinderItem(KModelEntityInterface $entity)
 {
     $data = $entity->getProperties();
     //Get the indexer result item
     $item = JArrayHelper::toObject($data, 'FinderIndexerResult');
     $item->url = $this->getURL($item->id, $this->extension, $this->layout);
     $item->route = $this->getLink($entity);
     $item->path = FinderIndexerHelper::getContentPath($item->route);
     // Trigger the onContentPrepare event.
     if ($item->description) {
         $item->summary = FinderIndexerHelper::prepareContent($item->description, $item->params);
     }
     if ($item->publish_on) {
         $item->publish_start_date = $item->publish_on;
     }
     if ($item->unpublish_on) {
         $item->publish_end_date = $item->unpublish_on;
     }
     // Finder needs the access field
     if (!isset($item->access)) {
         $item->access = 1;
     }
     $item->state = $item->enabled;
     // Set the item type.
     $item->type_id = $this->type_id;
     // Set the mime type.
     $item->mime = $this->mime;
     // Set the item layout.
     $item->layout = $this->layout;
     // Set the extension if present
     if (isset($entity->extension)) {
         $item->extension = $entity->extension;
     }
     if ($entity->isCreatable()) {
         // Add the author taxonomy data.
         $item->addTaxonomy('Author', $entity->getAuthor()->getName());
         // Add the start date
         $item->start_date = $entity->created_on;
     }
     return $item;
 }
开发者ID:daodaoliang,项目名称:nooku-framework,代码行数:47,代码来源:finder.php


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