當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FlexicontentFields::onIndexAdvSearch方法代碼示例

本文整理匯總了PHP中FlexicontentFields::onIndexAdvSearch方法的典型用法代碼示例。如果您正苦於以下問題:PHP FlexicontentFields::onIndexAdvSearch方法的具體用法?PHP FlexicontentFields::onIndexAdvSearch怎麽用?PHP FlexicontentFields::onIndexAdvSearch使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FlexicontentFields的用法示例。


在下文中一共展示了FlexicontentFields::onIndexAdvSearch方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onIndexAdvSearch

 public function onIndexAdvSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->isadvsearch && !$field->isadvfilter) {
         return;
     }
     FlexicontentFields::onIndexAdvSearch($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: onIndexAdvSearch

 function onIndexAdvSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->isadvsearch && !$field->isadvfilter) {
         return;
     }
     $field->isindexed = true;
     $field->extra_props = self::$extra_props;
     FlexicontentFields::onIndexAdvSearch($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: onIndexAdvSearch

 function onIndexAdvSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->isadvsearch && !$field->isadvfilter) {
         return;
     }
     // a. Each of the values of $values array will be added to the advanced search index as searchable text (column value)
     // b. Each of the indexes of $values will be added to the column 'value_id',
     //    and it is meant for fields that we want to be filterable via a drop-down select
     // c. If $values is null then only the column 'value' will be added to the search index after retrieving
     //    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::onIndexAdvSearch($field, $post, $item, $required_properties = array('title'), $search_properties = array('title', 'text'), $properties_spacer = ' ', $filter_func = 'strip_tags');
     return true;
 }
開發者ID:khetsothea,項目名稱:flexicontent-cck,代碼行數:20,代碼來源:termlist.php

示例4: onIndexAdvSearch

 function onIndexAdvSearch(&$field, &$post, &$item)
 {
     if (!$field->iscore) {
         return;
     }
     if (!$field->isadvsearch && !$field->isadvfilter) {
         return;
     }
     $values = $this->_prepareForSearchIndexing($field, $post, $for_advsearch = 1);
     $filter_func = $field->field_type == 'maintext' ? 'strip_tags' : null;
     $field->isindexed = in_array($field->field_type, array('type', 'state', 'tags', 'categories', 'created', 'createdby', 'modified', 'modifiedby'));
     FlexicontentFields::onIndexAdvSearch($field, $values, $item, $required_properties = array(), $search_properties = array(), $properties_spacer = ' ', $filter_func);
     return true;
 }
開發者ID:nettdotkomm,項目名稱:flexicontent-cck,代碼行數:14,代碼來源:core.php

示例5: onIndexAdvSearch

	function onIndexAdvSearch(&$field, &$post, &$item)
	{
		if ( !in_array($field->field_type, self::$field_types) ) return;
		if ( !$field->isadvsearch && !$field->isadvfilter ) return;
		
		FlexicontentFields::onIndexAdvSearch($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: onIndexAdvSearch

 function onIndexAdvSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->isadvsearch && !$field->isadvfilter) {
         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('ADV: '.print_r($values, true), 'notice');
     FlexicontentFields::onIndexAdvSearch($field, $values, $item, $required_properties = array(), $search_properties = array(), $properties_spacer = ' ', $filter_func = null);
     return true;
 }
開發者ID:khetsothea,項目名稱:flexicontent-cck,代碼行數:34,代碼來源:relation.php

示例7: onIndexAdvSearch

 function onIndexAdvSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->isadvsearch && !$field->isadvfilter) {
         return;
     }
     if ($post === null) {
         // null indicates that indexer is running, values is set to NULL which means retrieve data from the DB
         $values = null;
         $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;
     } else {
         $_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;
             }
         }
     }
     FlexicontentFields::onIndexAdvSearch($field, $values, $item, $required_properties = array('filename'), $search_properties = array('altname', 'description'), $properties_spacer = ' ', $filter_func = 'strip_tags');
     return true;
 }
開發者ID:khetsothea,項目名稱:flexicontent-cck,代碼行數:27,代碼來源:file.php

示例8: onIndexAdvSearch

	function onIndexAdvSearch(&$field, &$post, &$item) {
		if ( !in_array($field->field_type, self::$field_types) ) return;
		if ( !$field->isadvsearch && !$field->isadvfilter ) return;
		
		FlexicontentFields::onIndexAdvSearch($field, $post, $item, $required_properties=array(), $search_properties=array(), $properties_spacer=' ', $filter_func='strip_tags');
		return true;
	}
開發者ID:kosmosby,項目名稱:medicine-prof,代碼行數:7,代碼來源:proizvoditel.php

示例9: onIndexAdvSearch

	function onIndexAdvSearch(&$field, &$post, &$item)
	{
		if ( !in_array($field->field_type, self::$field_types) ) return;
		if ( !$field->isadvsearch && !$field->isadvfilter ) return;
		
		FlexicontentFields::onIndexAdvSearch($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

示例10: onIndexAdvSearch

	function onIndexAdvSearch(&$field, &$post, &$item)
	{
		if ( !$field->iscore ) return;
		if ( !$field->isadvsearch && !$field->isadvfilter ) return;
		
		$values = $this->_prepareForSearchIndexing($field, $post, $for_advsearch=1);
		$filter_func = $field->field_type == 'maintext' ? 'strip_tags' : null;
		
		FlexicontentFields::onIndexAdvSearch($field, $values, $item, $required_properties=array(), $search_properties=array(), $properties_spacer=' ', $filter_func);
		return true;
	}
開發者ID:kosmosby,項目名稱:medicine-prof,代碼行數:11,代碼來源:core.php

示例11: onIndexAdvSearch

	function onIndexAdvSearch(&$field, &$post, &$item)
	{
		if ( !in_array($field->field_type, self::$field_types) ) return;
		if ( !$field->isadvsearch && !$field->isadvfilter ) 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->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::onIndexAdvSearch($field, $values, $item, $required_properties=array('filename'), $search_properties=array('altname', 'description'), $properties_spacer=' ', $filter_func='strip_tags');
		return true;
	}
開發者ID:kosmosby,項目名稱:medicine-prof,代碼行數:18,代碼來源:file.php

示例12: onIndexAdvSearch

	function onIndexAdvSearch(&$field, &$post, &$item) {
		if ($field->field_type != 'phonenumbers') return;
		if ( !$field->isadvsearch ) return;
		
		FlexicontentFields::onIndexAdvSearch($field, $post, $item, $required_properties=array(), $search_properties=array(), $properties_spacer=' ', $filter_func=null);
		return true;
	}
開發者ID:kosmosby,項目名稱:medicine-prof,代碼行數:7,代碼來源:phonenumbers.php


注:本文中的FlexicontentFields::onIndexAdvSearch方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。