Exemple #1
0
 public static function getContacts($query)
 {
     $contactSelect = self::_getDisplayResultPattern("c", "name");
     $data = Contact::collection()->whereLike("name", $query)->setColumns([$contactSelect, "name"])->setOrderByQuery("name")->jsonSerialize();
     foreach ($data as $k => $d) {
         $data[$k]['type'] = 'Contact';
     }
     return $data;
 }
Exemple #2
0
 public function contacts()
 {
     return [0 => '- Campaign Default -'] + Contact::collection()->getKeyPair('id', 'reference');
 }