コード例 #1
0
ファイル: SoapDeprecated.php プロジェクト: MexinaD/SuiteCRM
function opportunity_by_search($name, $where = '', $msi_id = '0')
{
    $seed = new Opportunity();
    if (!$seed->ACLAccess('ListView')) {
        return array();
    }
    if ($where == '') {
        $where = $seed->build_generic_where_clause($name);
    }
    $response = $seed->get_list("name", $where, 0);
    $list = $response['list'];
    $output_list = array();
    // create a return array of names and email addresses.
    foreach ($list as $value) {
        $output_list[] = get_opportunity_array($value, $msi_id);
    }
    return $output_list;
}
コード例 #2
0
 public function testbuild_generic_where_clause()
 {
     $opportunity = new Opportunity();
     //test with empty string params
     $expected = "opportunities.name like '%' or accounts.name like '%'";
     $actual = $opportunity->build_generic_where_clause('');
     $this->assertSame($expected, $actual);
 }