예제 #1
0
 /**
  * save suggest, param $group has 2  values for the moment (ProjectTag,MemberTag)
  * @author EL GUENNUNI Sohaib s.elguennuni@gmail.com
  * @param [array,$array,string,$group] 
  * @return []
  */
 public function Add_Suggest(&$array_member, $array, $key, $group)
 {
     $suggest = new MemberSuggestions();
     $array = App_Utilities::convert_toArray($array, $key);
     App_Utilities::Concat_Result($array_member, $array);
     $array_member['limit'] -= count($array['item_id']);
     switch ($group) {
         case 'ProjectTag':
             $suggest->saveSuggest($array_member, $this->_group_project);
             break;
         case 'MemberTag':
             $suggest->saveSuggest($array_member, $this->_group_profil);
             break;
     }
 }
예제 #2
0
 /**
  * suggest
  * @author EL GUENNUNI Sohaib s.elguennuni@gmail.com
  * @uses absttract_class
  * @category FrontOffice
  * @package library/app
  */
 public static function suggest($model)
 {
     $suggest = new MemberSuggestions();
     $configInstance = self::getConfig();
     $array_member = array('item_id' => array(0 => 0), 'index' => 1, 'limit' => $configInstance->value->max_project_suggestions);
     if ($array_member['limit'] > 0) {
         App_Tag_Suggest_ProjectTag::project_tag($array_member, self::$_group_suggest, $model);
     }
     if ($array_member['limit'] > 0) {
         App_Tag_Suggest_ProjectTag::project_my_contact($array_member);
     }
     if ($array_member['limit'] > 0) {
         App_Tag_Suggest_ProjectTag::last_project($array_member);
     }
     $suggest->saveSuggest($array_member, $model);
     return $array_member;
 }
예제 #3
0
 /**
  * 
  * @author EL GUENNUNI Sohaib s.elguennuni@gmail.com
  * @uses absttract_class
  * @category FrontOffice
  * @package library/app
  */
 public static function suggest($model)
 {
     $suggest = new MemberSuggestions();
     $configInstance = self::getConfig();
     $array_member = array('item_id' => array(0 => App_Utilities::getIdMember()), 'index' => 1, 'limit' => $configInstance->value->max_member_suggestions);
     if ($array_member['limit'] > 0) {
         App_Tag_Suggest_MemberTag::profil_tag($array_member, self::$_group_suggest, $model);
     }
     if ($array_member['limit'] > 0) {
         App_Tag_Suggest_MemberTag::profil_visit($array_member, self::$_group_suggest);
     }
     if ($array_member['limit'] > 0) {
         App_Tag_Suggest_MemberTag::contact_my_contact($array_member, self::$_group_suggest);
     }
     if ($array_member['limit'] > 0) {
         App_Tag_Suggest_MemberTag::last_contact_registered($array_member, self::$_group_suggest);
     }
     $suggest->saveSuggest($array_member, $model);
     return $array_member;
 }