removed i18n_taxonomy module from features dependencies

fixed some bugs
This commit is contained in:
Bachir Soussi Chiadmi
2015-11-24 23:50:19 +01:00
parent 9a18821b7e
commit 50dfd2d89b
6 changed files with 49 additions and 6 deletions

View File

@@ -171,6 +171,9 @@ function materio_search_api_search_api_solr_dynamic_field_info() {
function materio_search_api_entity_property_info_alter(&$info){
// dsm($info, 'hook_entity_property_info_alter | info');
// watchdog('materio solr', 'materio_search_api_entity_property_info_alter', array());
// NODE PROPERTIES
$node_props = &$info['node']['properties'];
for ($i=1; $i <= 5 ; $i++) {
@@ -214,6 +217,7 @@ function materio_search_api_entity_property_info_alter(&$info){
);
// TAXONOMIE TERMS PROPERTIES
$term_props = &$info['taxonomy_term']['properties'];
@@ -223,6 +227,12 @@ function materio_search_api_entity_property_info_alter(&$info){
'type' => 'text',
'getter callback' => 'materio_search_api_term_property_dup_name',
);
// $term_props['materio_search_api_term_property_name_translated'] = array(
// 'label' => t("Term name translated"),
// 'description' => t(""),
// 'type' => 'text',
// 'getter callback' => 'materio_search_api_term_property_name_translated',
// );
}
/**
@@ -421,10 +431,28 @@ function rip_tags($string) {
return $string;
}
/**
* Taxonomy terms properties
*/
function materio_search_api_term_property_dup_name($term){
$lang = $term->language;
return $term->name_field[$lang][0]['value'];
}
// function materio_search_api_term_property_name_translated($term){
// if($term->vid == 4){
// print_r(get_defined_vars());
//
// // print_r($term);
//
// $trans = module_exists('i18n_taxonomy')
// ? i18n_taxonomy_term_name($term, 'fr')
// : $term->name;
//
// print_r($trans);
// print "\n";
// }
// }
/**
* - - -- - - - - - - blocks - - - - - - - - - - -