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


PHP FlexicontentFields::onIndexSearch方法代码示例

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


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

示例1: onIndexSearch

 public function onIndexSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->issearch) {
         return;
     }
     FlexicontentFields::onIndexSearch($field, $post, $item, $required_properties = array('originalname'), $search_properties = array('title', 'desc'), $properties_spacer = ' ', $filter_func = null);
     return true;
 }
开发者ID:noxidsoft,项目名称:flexicontent-cck,代码行数:11,代码来源:parentfield.php

示例2: onIndexSearch

 function onIndexSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->issearch) {
         return;
     }
     $field->isindexed = true;
     $field->extra_props = self::$extra_props;
     FlexicontentFields::onIndexSearch($field, $post, $item, $required_properties = array(), $search_properties = array('text'), $properties_spacer = ' ', $filter_func = null);
     return true;
 }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:13,代码来源:radioimage.php

示例3: onIndexSearch

 function onIndexSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->issearch) {
         return;
     }
     // a. Each of the values of $values array will be added to the basic search index (one record per item)
     // b. If $values is null then the column value from table 'flexicontent_fields_item_relations' for current field / item pair will be used
     // 'required_properties' is meant for multi-property fields, do not add to search index if any of these is empty
     // 'search_properties'   contains property fields that should be added as text
     // 'properties_spacer'  is the spacer for the 'search_properties' text
     // 'filter_func' is the filtering function to apply to the final text
     FlexicontentFields::onIndexSearch($field, $post, $item, $required_properties = array('title'), $search_properties = array('title', 'text'), $properties_spacer = ' ', $filter_func = 'strip_tags');
     return true;
 }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:17,代码来源:termlist.php

示例4: onIndexSearch

 function onIndexSearch(&$field, &$post, &$item)
 {
     if (!$field->iscore) {
         return;
     }
     if (!$field->issearch) {
         return;
     }
     $values = $this->_prepareForSearchIndexing($field, $post, $for_advsearch = 0);
     // if post is null, indexer is running
     $filter_func = $field->field_type == 'maintext' ? 'strip_tags' : null;
     // 'isindexed' is not applicable for basic index and CORE fields
     $field->isindexed = 0;
     //in_array($field->field_type, array('type','state','tags','categories','created','createdby','modified','modifiedby'));
     // if values is null means retrieve data from the DB
     FlexicontentFields::onIndexSearch($field, $values, $item, $required_properties = array(), $search_properties = array(), $properties_spacer = ' ', $filter_func);
     return true;
 }
开发者ID:nettdotkomm,项目名称:flexicontent-cck,代码行数:18,代码来源:core.php

示例5: onIndexSearch

	function onIndexSearch(&$field, &$post, &$item)
	{
		if ( !in_array($field->field_type, self::$field_types) ) return;
		if ( !$field->issearch ) return;
		
		FlexicontentFields::onIndexSearch($field, $post, $item, $required_properties=array('url'), $search_properties=array('title','author','description','audiotype'), $properties_spacer=' ', $filter_func=null);
		return true;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:8,代码来源:sharedaudio.php

示例6: onIndexSearch

 function onIndexSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->issearch) {
         return;
     }
     if ($post) {
         $_files_data = $this->getFileData($post, $published = true, $extra_select = ', id AS value_id');
         $values = array();
         if ($_files_data) {
             foreach ($_files_data as $_file_id => $_file_data) {
                 $values[$_file_id] = (array) $_file_data;
             }
         }
     } else {
         $field->unserialize = 0;
         $field->field_rawvalues = 1;
         $field->field_valuesselect = ' file.id AS value_id, file.altname, file.description, file.filename';
         $field->field_valuesjoin = ' JOIN #__flexicontent_files AS file ON file.id = fi.value';
         $field->field_groupby = null;
     }
     FlexicontentFields::onIndexSearch($field, $post, $item, $required_properties = array('filename'), $search_properties = array('altname', 'description'), $properties_spacer = ' ', $filter_func = 'strip_tags');
     return true;
 }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:26,代码来源:file.php

示例7: onIndexSearch

 function onIndexSearch(&$field, &$post, &$item)
 {
     if (!$field->iscore) {
         return;
     }
     if (!$field->issearch) {
         return;
     }
     $values = $this->_prepareForSearchIndexing($field, $post, $for_advsearch = 0);
     $filter_func = $field->field_type == 'maintext' ? 'strip_tags' : null;
     FlexicontentFields::onIndexSearch($field, $values, $item, $required_properties = array(), $search_properties = array(), $properties_spacer = ' ', $filter_func);
     return true;
 }
开发者ID:jakesyl,项目名称:flexicontent,代码行数:13,代码来源:core.php

示例8: onIndexSearch

 function onIndexSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->issearch) {
         return;
     }
     if ($post === null) {
         $values = null;
         $field->field_valuesselect = ' CAST(fi.value AS UNSIGNED) AS value_id, ct.title AS value';
         $field->field_valuesjoin = ' JOIN #__content AS ct ON ct.id = CAST(fi.value AS UNSIGNED)';
         $field->field_groupby = ' GROUP BY CAST(fi.value AS UNSIGNED) ';
     } else {
         if (!empty($post)) {
             $_ids = array();
             foreach ($post as $_id) {
                 $_ids[] = (int) $_id;
             }
             // convert itemID:catID to itemID
             $db = JFactory::getDBO();
             $query = 'SELECT i.id AS value_id, i.title AS value FROM #__content AS i WHERE i.id IN (' . implode($_ids, ',') . ')';
             $db->setQuery($query);
             $_values = $db->loadAssocList();
             $values = array();
             foreach ($_values as $v) {
                 $values[$v['value_id']] = $v['value'];
             }
         }
     }
     //JFactory::getApplication()->enqueueMessage('BAS: '.print_r($values, true), 'notice');
     FlexicontentFields::onIndexSearch($field, $values, $item, $required_properties = array(), $search_properties = array(), $properties_spacer = ' ', $filter_func = null);
     return true;
 }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:34,代码来源:relation.php

示例9: onIndexSearch

	function onIndexSearch(&$field, &$post, &$item)
	{
		if ( !in_array($field->field_type, self::$field_types) ) return;
		if ( !$field->issearch ) return;
		$pst = array();
                if(isset($post[0]['country'])){
                    foreach($post[0]['country'] as $country)
                        $pst[] = $country;
                    
                    //$post = $pst;
                }
                
		FlexicontentFields::onIndexSearch($field, $value, $item, $required_properties=array(), $search_properties=array(), $properties_spacer=' ', $filter_func='strip_tags');
		return true;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:15,代码来源:proizvoditel.php

示例10: onIndexSearch

	function onIndexSearch(&$field, &$post, &$item)
	{
		if ( !in_array($field->field_type, self::$field_types) ) return;
		if ( !$field->issearch ) return;
		
		FlexicontentFields::onIndexSearch($field, $post, $item, $required_properties=array(), $search_properties=array(), $properties_spacer=' ', $filter_func='strip_tags');
		return true;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:8,代码来源:textarea.php

示例11: onIndexSearch

	function onIndexSearch(&$field, &$post, &$item)
	{
		if ( !in_array($field->field_type, self::$field_types) ) return;
		if ( !$field->issearch ) return;
		
		FlexicontentFields::onIndexSearch($field, $post, $item, $required_properties=array(), $search_properties=array('addr1','addr2','addr3','city','state','province','zip','country'), $properties_spacer=' ', $filter_func=null);
		return true;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:8,代码来源:addressint.php

示例12: onIndexSearch

	function onIndexSearch(&$field, &$post, &$item)
	{
		if ($field->field_type != 'phonenumbers') return;
		if ( !$field->issearch ) return;
		
		FlexicontentFields::onIndexSearch($field, $post, $item, $required_properties=array(), $search_properties=array(), $properties_spacer=' ', $filter_func=null);
		return true;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:8,代码来源:phonenumbers.php


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