Exemple #1
0
 public static function drop($value = null, $name = 'staff_id')
 {
     foreach (self::fetchAll() as $staff) {
         $arr[$staff['staff_id']] = $staff['name'] . ' <' . $staff['email'] . '>';
     }
     $drop = \LSS\Form\Drop::_get()->setOptions($arr);
     $drop->setName($name);
     $drop->setValue($value);
     return $drop;
 }
Exemple #2
0
 public static final function contactDrop($account_id = null, $value = null, $name = 'contact_id')
 {
     if (is_null($account_id)) {
         return false;
     }
     $arr = array();
     foreach (self::fetchContacts($account_id) as $contact) {
         $arr[$contact['contact_id']] = $contact['first_name'] . ' ' . $contact['last_name'] . ' <' . $contact['email'] . '>';
     }
     $drop = \LSS\Form\Drop::_get()->setOptions($arr);
     $drop->setName($name);
     $drop->setValue($value);
     return $drop;
 }
Exemple #3
0
 public static final function contactDrop($account_id = null, $contact_type = null, $value = null, $name = 'contact_id', $format = self::FA_NAME)
 {
     $arr = array();
     foreach (self::fetchAllByAccountAndType($account_id, array($contact_type, self::BOTH)) as $contact) {
         $arr[$contact['contact_id']] = self::$format($contact);
     }
     $drop = \LSS\Form\Drop::_get()->setOptions($arr);
     $drop->setName($name);
     $drop->setValue($value);
     return $drop;
 }