This class has been auto-generated by the Doctrine ORM Framework
Author: Your name here
Inheritance: extends sfDoctrineRecord
コード例 #1
0
 public function __construct($id = null, $name = null, $companyId = null, $status = null, $address = null, $cellPhone = null, $comment = null, $email = null, $faxPhone = null, $title = null, $workPhone = null, $BaseContactType = null)
 {
     parent::__construct();
     $this->id = $id;
     $this->name = $name;
     $this->companyId = $companyId;
     $this->status = $status;
     $this->address = $address;
     $this->cellPhone = $cellPhone;
     $this->comment = $comment;
     $this->email = $email;
     $this->faxPhone = $faxPhone;
     $this->title = $title;
     $this->workPhone = $workPhone;
     $this->BaseContactType = $BaseContactType;
 }
コード例 #2
0
ファイル: BaseContact.php プロジェクト: yasirgit/afids
 /**
  * Returns a peer instance associated with this om.
  *
  * Since Peer classes are not to have any instance attributes, this method returns the
  * same instance for all member of this class. The method could therefore
  * be static, but this would prevent one from overriding the behavior.
  *
  * @return     ContactPeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new ContactPeer();
     }
     return self::$peer;
 }
コード例 #3
0
 /**
  * This function will return content of specific searchable column. It uses inherited
  * behaviour for all columns except for `firstname`, which is used as a column representing
  * the first and last name of the contact, and all of the addresses, which are saved in full
  * form.
  *
  * @param string $column_name Column name
  * @return string
  */
 function getSearchableColumnContent($column_name)
 {
     if ($column_name == 'firstname') {
         return trim($this->getFirstname() . ' ' . $this->getLastname());
     } else {
         if ($column_name == 'w_address') {
             return strip_tags(trim($this->getFullWorkAddress()));
         } else {
             if ($column_name == 'h_address') {
                 return strip_tags(trim($this->getFullHomeAddress()));
             } else {
                 if ($column_name == 'o_address') {
                     return strip_tags(trim($this->getFullOtherAddress()));
                 }
             }
         }
     }
     return parent::getSearchableColumnContent($column_name);
 }
コード例 #4
0
 function getUserType()
 {
     $user_type = parent::getUserType();
     return $user_type;
 }
コード例 #5
0
 /**
  * Delete this object
  *
  * @param void
  * @return boolean
  */
 function delete()
 {
     if ($this->isAccountOwner()) {
         return false;
     }
     // if
     if ($this->isTaggable()) {
         $this->clearTags();
     }
     // if
     // TODO check all things that need to be deleted
     // ticket subscriptions
     // message subscriptions
     // project-user association
     $this->deleteAvatar();
     $this->clearImValues();
     if ($this->hasUserAccount()) {
         ProjectUsers::clearByUser($this->getUserAccount());
         MessageSubscriptions::clearByUser($this->getUserAccount());
         $this->getUserAccount()->delete();
     }
     // if
     return parent::delete();
 }