Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4235 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 4235 Rev 5561
Línea 77... Línea 77...
77
    }
77
    }
Línea 78... Línea 78...
78
    
78
    
79
    
79
    
-
 
80
    /**
-
 
81
     *
-
 
82
     * @param String $uuid
-
 
83
     * @return DiscoveryContact
-
 
84
     */
-
 
85
    public function fetchOneByCorporateEmail($corporate_email)
-
 
86
    {
-
 
87
        
-
 
88
        $select = $this->sql->select(self::_TABLE);
-
 
89
        $select->where->equalTo('corporate_email', $corporate_email);
-
 
90
        
-
 
91
        $prototype = new DiscoveryContact();
-
 
92
        return $this->executeFetchOneObject($select, $prototype);
-
 
93
    }
-
 
94
    
-
 
95
    
-
 
96
    
-
 
97
    
80
    /**
98
    /**
81
     *
99
     *
82
     * @param string $search
100
     * @param string $search
83
     * @param int $company_id
101
     * @param int $company_id
84
     * @param int $page
102
     * @param int $page
Línea 91... Línea 109...
91
    {
109
    {
92
        $prototype = new DiscoveryContact();
110
        $prototype = new DiscoveryContact();
93
        $select = $this->sql->select(self::_TABLE);
111
        $select = $this->sql->select(self::_TABLE);
94
        $select->where->equalTo('company_id', $company_id);
112
        $select->where->equalTo('company_id', $company_id);
Línea -... Línea 113...
-
 
113
        
95
        
114
 
96
        if($search) {
115
        if($search) {
97
            $select->where->like('uuid', '%' . $search . '%')
116
            $select->where->like('uuid', '%' . $search . '%')
98
            ->or->like('first_name', '%' . $search . '%')
117
            ->or->like('first_name', '%' . $search . '%')
99
            ->or->like('last_name', '%' . $search . '%')
118
            ->or->like('last_name', '%' . $search . '%')
100
            ->or->like('corporate_email', '%' . $search . '%')
119
            ->or->like('corporate_email', '%' . $search . '%')
101
            ->or->like('company', '%' . $search . '%')
120
            ->or->like('company', '%' . $search . '%')
102
            ->or->like('position', '%' . $search . '%')
121
            ->or->like('position', '%' . $search . '%')
103
            ->or->like('country', '%' . $search . '%');
122
            ->or->like('country', '%' . $search . '%');
104
        }
123
        }
105
        $select->order($order_field . ' ' . $order_direction);
124
        $select->order($order_field . ' ' . $order_direction);
106
        
125
 
107
        $hydrator   = new ObjectPropertyHydrator();
126
        $hydrator   = new ObjectPropertyHydrator();
Línea 108... Línea 127...
108
        $resultset  = new HydratingResultSet($hydrator, $prototype);
127
        $resultset  = new HydratingResultSet($hydrator, $prototype);
109
        
128