Beispiel #1
0
 public function __construct()
 {
     parent::__construct(get_class($this));
     $this->SetTrimer(array('Subject'));
     $this->Owner = null;
     $this->SetDefaults(array('IdHelpdeskThread' => 0, 'StrHelpdeskThreadHash' => trim(base_convert(md5(microtime(true) . rand(1000, 9999)), 16, 32), '0'), 'IdTenant' => 0, 'IdOwner' => 0, 'ItsMe' => false, 'IsArchived' => false, 'Type' => EHelpdeskThreadType::None, 'Subject' => '', 'Created' => time(), 'Updated' => time(), 'PostCount' => 0, 'LastPostId' => 0, 'LastPostOwnerId' => 0, 'Notificated' => false, 'HasAttachments' => false, 'IsRead' => false));
 }
Beispiel #2
0
 /**
  * @param CAccount $oAccount
  */
 public function __construct(CAccount $oAccount)
 {
     parent::__construct(get_class($this));
     $this->SetTrimer(array('Name', 'Signature', 'IncomingMailServer', 'IncomingMailLogin', 'IncomingMailPassword', 'OutgoingMailServer'));
     $this->SetLower(array('IncomingMailServer', 'OutgoingMailServer'));
     $this->SetDefaults(array('IdFetcher' => 0, 'IdAccount' => $oAccount->IdAccount, 'IdUser' => $oAccount->IdUser, 'IdDomain' => $oAccount->IdDomain, 'IdTenant' => $oAccount->IdTenant, 'IsEnabled' => true, 'IsLocked' => false, 'CheckInterval' => 0, 'CheckLastTime' => 0, 'Name' => '', 'Email' => '', 'Signature' => '', 'SignatureOptions' => EAccountSignatureOptions::DontAdd, 'LeaveMessagesOnServer' => true, 'IncomingMailServer' => '', 'IncomingMailPort' => 110, 'IncomingMailLogin' => '', 'IncomingMailPassword' => '', 'IncomingMailSecurity' => \MailSo\Net\Enumerations\ConnectionSecurityType::NONE, 'IsOutgoingEnabled' => false, 'OutgoingMailServer' => '', 'OutgoingMailPort' => 25, 'OutgoingMailAuth' => true, 'OutgoingMailSecurity' => \MailSo\Net\Enumerations\ConnectionSecurityType::NONE, 'Folder' => 'INBOX'));
 }
Beispiel #3
0
	public function __construct()
	{
		parent::__construct(get_class($this));

		$this->SetTrimer(array('Name', 'Email', 'PasswordHash'));

		$this->SetLower(array('Email'));

		$oSettings =& CApi::GetSettings();

		$this->SetDefaults(array(
			'IdHelpdeskUser'		=> 0,
			'IdSystemUser'			=> 0,
			'IdTenant'				=> 0,
			'Activated'				=> false,
			'Blocked'				=> false,
			'IsAgent'				=> false,
//			'IsSocial'				=> false,
			'Name'					=> '',
			'Email'					=> '',
			'NotificationEmail'		=> '',
			'SocialId'				=> '',
			'SocialType'			=> '',
			'ActivateHash'			=> md5(microtime(true).rand(1000, 9999)),
			'Language'				=> $oSettings->GetConf('Common/DefaultLanguage'),
			'DateFormat'			=> $oSettings->GetConf('Common/DefaultDateFormat'),
			'TimeFormat'			=> $oSettings->GetConf('Common/DefaultTimeFormat'),
			'NotificationPassword'	=> '',
			'PasswordHash'			=> '',
			'PasswordSalt'			=> md5(microtime(true).rand(10000, 99999)),
			'MailNotifications'		=> false,
			'Created'				=> time()

		));
	}
Beispiel #4
0
	public function __construct()
	{
		parent::__construct(get_class($this));

		$this->SetDefaults(array(
			'Id' => '',
			'Type' => EFileStorageType::Personal,
			'Path' => '',
			'Name' => '',
			'Size' => 0,
			'IsFolder' => false,
			'IsLink' => false,
			'LinkType' => EFileStorageLinkType::Unknown,
			'LinkUrl' => '',
			'LastModified' => 0,
			'ContentType' => '',
			'Thumb' => false,
			'ThumbnailLink' => '',
			'Hash' => '',
			'Shared' => false,
			'Owner' => '',
			'Content' => '',
			'IsExternal' => false
		));
	}
Beispiel #5
0
 /**
  * @param CDomain $oDomain
  * @return void
  */
 public function __construct()
 {
     parent::__construct(get_class($this), 'IdIdentity');
     $this->SetTrimer(array('Email', 'FriendlyName'));
     $this->SetDefaults(array('IdIdentity' => 0, 'IdUser' => 0, 'IdAccount' => 0, 'Virtual' => false, 'Default' => false, 'Enabled' => true, 'Email' => '', 'FriendlyName' => '', 'Signature' => '', 'SignatureType' => EAccountSignatureType::Html, 'UseSignature' => false));
     CApi::Plugin()->RunHook('api-identity-construct', array(&$this));
 }
Beispiel #6
0
 public function __construct()
 {
     parent::__construct(get_class($this), 'IdGroup');
     $this->__USE_TRIM_IN_STRINGS__ = true;
     $this->SetDefaults(array('IdGroup' => '', 'IdGroupStr' => '', 'IdUser' => 0, 'Name' => '', 'IsOrganization' => false, 'Email' => '', 'Company' => '', 'Street' => '', 'City' => '', 'State' => '', 'Zip' => '', 'Country' => '', 'Phone' => '', 'Fax' => '', 'Web' => '', 'Events' => array()));
     CApi::Plugin()->RunHook('api-group-construct', array(&$this));
 }
Beispiel #7
0
 public function __construct()
 {
     parent::__construct(get_class($this));
     $this->SetTrimer(array('Text'));
     $this->Owner = null;
     $this->Attachments = null;
     $this->SetDefaults(array('IdHelpdeskPost' => 0, 'IdHelpdeskThread' => 0, 'IdTenant' => 0, 'IdOwner' => 0, 'Type' => EHelpdeskPostType::Normal, 'SystemType' => EHelpdeskPostSystemType::None, 'Created' => time(), 'IsThreadOwner' => true, 'ItsMe' => false, 'Text' => ''));
 }
Beispiel #8
0
 public function __construct()
 {
     parent::__construct(get_class($this), 'IdContact');
     $this->__USE_TRIM_IN_STRINGS__ = true;
     $this->SetDefaults(array('IdContact' => '', 'IdContactStr' => '', 'IdUser' => 0, 'IdDomain' => 0, 'IdTenant' => 0, 'GroupsIds' => array(), 'Type' => EContactType::Personal, 'IdTypeLink' => '', 'FullName' => '', 'UseFriendlyName' => true, 'ViewEmail' => '', 'PrimaryEmail' => CApi::GetConf('contacts.default-primary-email', EPrimaryEmailType::Home), 'DateCreated' => time(), 'DateModified' => time(), 'Title' => '', 'FirstName' => '', 'LastName' => '', 'NickName' => '', 'Skype' => '', 'Facebook' => '', 'HomeEmail' => '', 'HomeStreet' => '', 'HomeCity' => '', 'HomeState' => '', 'HomeZip' => '', 'HomeCountry' => '', 'HomePhone' => '', 'HomeFax' => '', 'HomeMobile' => '', 'HomeWeb' => '', 'BusinessEmail' => '', 'BusinessCompany' => '', 'BusinessStreet' => '', 'BusinessCity' => '', 'BusinessState' => '', 'BusinessZip' => '', 'BusinessCountry' => '', 'BusinessJobTitle' => '', 'BusinessDepartment' => '', 'BusinessOffice' => '', 'BusinessPhone' => '', 'BusinessMobile' => '', 'BusinessFax' => '', 'BusinessWeb' => '', 'OtherEmail' => '', 'Notes' => '', 'BirthdayDay' => 0, 'BirthdayMonth' => 0, 'BirthdayYear' => 0, 'ReadOnly' => false, 'Global' => false, 'ItsMe' => false, 'ETag' => '', 'SharedToAll' => false, 'HideInGAB' => false));
     $this->__LOCK_DATE_MODIFIED__ = false;
     $this->__SKIP_VALIDATE__ = false;
     CApi::Plugin()->RunHook('api-contact-construct', array(&$this));
 }
Beispiel #9
0
 public function __construct($sLogin = '', $Description = '')
 {
     parent::__construct(get_class($this), 'IdTenant');
     $this->__USE_TRIM_IN_STRINGS__ = true;
     $oSettings =& CApi::GetSettings();
     $this->SetDefaults(array('IdTenant' => 0, 'IdChannel' => 0, 'IsDisabled' => false, 'IsDefault' => false, 'Login' => $sLogin, 'Email' => '', 'PasswordHash' => '', 'Description' => $Description, 'IsEnableAdminPanelLogin' => false, 'QuotaInMB' => 0, 'AllocatedSpaceInMB' => 0, 'FilesUsageInBytes' => '0', 'FilesUsageInMB' => 0, 'FilesUsageDynamicQuotaInMB' => 0, 'UserCountLimit' => 0, 'DomainCountLimit' => 0, 'Capa' => (string) $oSettings->GetConf('Common/TenantGlobalCapa'), 'AllowChangeAdminEmail' => true, 'AllowChangeAdminPassword' => true, 'Expared' => 0, 'PayUrl' => '', 'IsTrial' => false, 'HelpdeskAdminEmailAccount' => '', 'HelpdeskClientIframeUrl' => '', 'HelpdeskAgentIframeUrl' => '', 'HelpdeskSiteName' => '', 'HelpdeskStyleAllow' => false, 'HelpdeskStyleImage' => '', 'HelpdeskStyleText' => '', 'LoginStyleImage' => '', 'AppStyleImage' => '', 'HelpdeskFacebookAllow' => !!$oSettings->GetConf('Helpdesk/FacebookAllow'), 'HelpdeskFacebookId' => (string) $oSettings->GetConf('Helpdesk/FacebookId'), 'HelpdeskFacebookSecret' => (string) $oSettings->GetConf('Helpdesk/FacebookSecret'), 'HelpdeskGoogleAllow' => !!$oSettings->GetConf('Helpdesk/GoogleAllow'), 'HelpdeskGoogleId' => (string) $oSettings->GetConf('Helpdesk/GoogleId'), 'HelpdeskGoogleSecret' => (string) $oSettings->GetConf('Helpdesk/GoogleSecret'), 'HelpdeskTwitterAllow' => !!$oSettings->GetConf('Helpdesk/TwitterAllow'), 'HelpdeskTwitterId' => (string) $oSettings->GetConf('Helpdesk/TwitterId'), 'HelpdeskTwitterSecret' => (string) $oSettings->GetConf('Helpdesk/TwitterSecret'), 'HelpdeskFetcherType' => EHelpdeskFetcherType::NONE, 'HelpdeskAllowFetcher' => false, 'HelpdeskFetcherTimer' => 0, 'SipAllow' => !!$oSettings->GetConf('Sip/AllowSip'), 'SipAllowConfiguration' => false, 'SipRealm' => (string) $oSettings->GetConf('Sip/Realm'), 'SipWebsocketProxyUrl' => (string) $oSettings->GetConf('Sip/WebsocketProxyUrl'), 'SipOutboundProxyUrl' => (string) $oSettings->GetConf('Sip/OutboundProxyUrl'), 'SipCallerID' => (string) $oSettings->GetConf('Sip/CallerID'), 'TwilioAllow' => !!$oSettings->GetConf('Twilio/AllowTwilio'), 'TwilioAllowConfiguration' => false, 'TwilioPhoneNumber' => (string) $oSettings->GetConf('Twilio/PhoneNumber'), 'TwilioAccountSID' => (string) $oSettings->GetConf('Twilio/AccountSID'), 'TwilioAuthToken' => (string) $oSettings->GetConf('Twilio/AuthToken'), 'TwilioAppSID' => (string) $oSettings->GetConf('Twilio/AppSID'), 'Socials' => $this->getDefaultSocials(), 'CalendarNotificationEmailAccount' => '', 'InviteNotificationEmailAccount' => ''));
     $this->SetLower(array('Login', 'Email', 'HelpdeskAdminEmailAccount', 'CalendarNotificationEmailAccount', 'InviteNotificationEmailAccount'));
     $this->SetUpper(array('Capa'));
 }
Beispiel #10
0
 /**
  * @param CDomain $oDomain
  * @return void
  */
 public function __construct($oDomain)
 {
     parent::__construct(get_class($this), 'IdAccount');
     $this->Domain = $oDomain;
     $this->User = new CUser($oDomain);
     $this->aExtension = array();
     $this->SetTrimer(array('Email', 'FriendlyName', 'IncomingMailServer', 'IncomingMailLogin', 'IncomingMailPassword', 'PreviousMailPassword', 'OutgoingMailServer', 'OutgoingMailLogin'));
     $this->SetLower(array('IncomingMailServer', 'OutgoingMailServer'));
     $this->SetDefaults(array('IdAccount' => 0, 'IdUser' => 0, 'IdDomain' => $oDomain->IdDomain, 'IdTenant' => $oDomain->IdTenant, 'IsDefaultAccount' => true, 'IsInternal' => $oDomain->IsInternal, 'IsDisabled' => false, 'IsMailingList' => false, 'StorageQuota' => $oDomain->UserQuota, 'StorageUsedSpace' => 0, 'Email' => '', 'FriendlyName' => '', 'IncomingMailProtocol' => $oDomain->IncomingMailProtocol, 'IncomingMailServer' => $oDomain->IncomingMailServer, 'IncomingMailPort' => $oDomain->IncomingMailPort, 'IncomingMailLogin' => '', 'IncomingMailPassword' => '', 'IncomingMailUseSSL' => $oDomain->IncomingMailUseSSL, 'PreviousMailPassword' => '', 'OutgoingMailServer' => $oDomain->OutgoingMailServer, 'OutgoingMailPort' => $oDomain->OutgoingMailPort, 'OutgoingMailLogin' => '', 'OutgoingMailPassword' => '', 'OutgoingMailAuth' => $oDomain->OutgoingMailAuth, 'OutgoingMailUseSSL' => $oDomain->OutgoingMailUseSSL, 'OutgoingSendingMethod' => $oDomain->OutgoingSendingMethod, 'HideInGAB' => false, 'Signature' => '', 'SignatureType' => EAccountSignatureType::Html, 'SignatureOptions' => EAccountSignatureOptions::DontAdd, 'GlobalAddressBook' => $oDomain->GlobalAddressBook, 'AllowCompose' => true, 'AllowReply' => true, 'AllowForward' => true, 'DetectSpecialFoldersWithXList' => $oDomain->DetectSpecialFoldersWithXList, 'CustomFields' => '', 'ForceSaveOnLogin' => false, 'SocialEmail' => ''));
     CApi::Plugin()->RunHook('api-account-construct', array(&$this));
 }
Beispiel #11
0
 /**
  * @return void
  */
 public function __construct(CDomain $oDomain)
 {
     parent::__construct(get_class($this), 'IdUser');
     $oSettings =& CApi::GetSettings();
     $iSaveMail = $oSettings->GetConf('WebMail/SaveMail');
     $iSaveMail = ESaveMail::Always !== $iSaveMail ? $oSettings->GetConf('WebMail/SaveMail') : ESaveMail::DefaultOn;
     $this->oSubCache = null;
     $this->__USE_TRIM_IN_STRINGS__ = true;
     $this->SetUpper(array('Capa'));
     $this->SetDefaults(array('IdUser' => 0, 'IdSubscription' => 0, 'IdHelpdeskUser' => 0, 'MailsPerPage' => $oDomain->MailsPerPage, 'ContactsPerPage' => $oDomain->ContactsPerPage, 'AutoCheckMailInterval' => $oDomain->AutoCheckMailInterval, 'CreatedTime' => 0, 'LastLogin' => 0, 'LastLoginNow' => 0, 'LoginsCount' => 0, 'DefaultSkin' => $oDomain->DefaultSkin, 'DefaultLanguage' => $oDomain->DefaultLanguage, 'DefaultEditor' => EUserHtmlEditor::Html, 'SaveMail' => $iSaveMail, 'Layout' => $oDomain->Layout, 'DefaultTimeZone' => 0, 'DefaultTimeFormat' => $oDomain->DefaultTimeFormat, 'DefaultDateFormat' => $oDomain->DefaultDateFormat, 'DefaultIncomingCharset' => CApi::GetConf('webmail.default-inc-charset', 'iso-8859-1'), 'Question1' => '', 'Question2' => '', 'Answer1' => '', 'Answer2' => '', 'TwilioNumber' => '', 'TwilioEnable' => true, 'TwilioDefaultNumber' => false, 'SipEnable' => true, 'SipImpi' => '', 'SipPassword' => '', 'Capa' => '', 'ClientTimeZone' => '', 'UseThreads' => $oDomain->UseThreads, 'SaveRepliedMessagesToCurrentFolder' => false, 'DesktopNotifications' => false, 'AllowChangeInputDirection' => false, 'EnableOpenPgp' => false, 'AllowAutosaveInDrafts' => true, 'AutosignOutgoingEmails' => false, 'AllowHelpdeskNotifications' => false, 'CustomFields' => '', 'FilesEnable' => true));
     CApi::Plugin()->RunHook('api-user-construct', array(&$this));
 }
Beispiel #12
0
	/**
	 * @param CAccount $oAccount
	 */
	public function __construct(CAccount $oAccount)
	{
		parent::__construct(get_class($this));

		$this->SetDefaults(array(
			'IdAccount'	=> $oAccount->IdAccount,
			'Enable'	=> true,
			'Field'		=> EFilterFiels::From,
			'Filter'	=> '',
			'Condition'	=> EFilterCondition::ContainSubstring,
			'Action'	=> EFilterAction::DoNothing,
			'FolderFullName' => ''
		));
	}
Beispiel #13
0
 /**
  * @param string $sName = ''
  * @param string $sUrl = null
  * @param int $iTenantId = 0
  */
 public function __construct($sName = '', $sUrl = null, $iTenantId = 0)
 {
     parent::__construct(get_class($this), 'IdDomain');
     $oSettings =& CApi::GetSettings();
     $aDefaults = array('IdDomain' => 0, 'IdTenant' => $iTenantId, 'IsDisabled' => false, 'Name' => trim($sName), 'Url' => null === $sUrl ? '' : trim($sUrl), 'IsDefaultDomain' => false, 'IsDefaultTenantDomain' => false, 'IsInternal' => false, 'UseThreads' => true, 'OverrideSettings' => true);
     $aSettingsMap = $this->GetSettingsMap();
     foreach ($aSettingsMap as $sProperty => $sSettingsName) {
         $aDefaults[$sProperty] = $oSettings->GetConf($sSettingsName);
     }
     $this->__USE_TRIM_IN_STRINGS__ = true;
     $this->SetDefaults($aDefaults);
     $this->aFolders = array(EFolderType::Inbox => array('INBOX', 'Inbox'), EFolderType::Drafts => array('Drafts', 'Draft'), EFolderType::Sent => array('Sent', 'Sent Items', 'Sent Mail'), EFolderType::Spam => array('Spam', 'Junk', 'Junk Mail', 'Junk E-mail', 'Bulk Mail'), EFolderType::Trash => array('Trash', 'Bin', 'Deleted', 'Deleted Items'));
     $this->SetLower(array('Name', 'IncomingMailServer', 'OutgoingMailServer'));
     CApi::Plugin()->RunHook('api-domain-construct', array(&$this));
 }
Beispiel #14
0
	public function __construct()
	{
		parent::__construct(get_class($this), 'Id');

		$this->__USE_TRIM_IN_STRINGS__ = true;

		$this->SetDefaults(array(
			'Id'			=> 0,
			'IdAccount'		=> 0,
			'IdSocial'		=> '',
			'Type'			=> \ESocialType::Unknown,
			'Name'			=> '',
			'AccessToken'	=> '',
			'RefreshToken'	=> ''
		));
	}
Beispiel #15
0
	public function __construct()
	{
		parent::__construct(get_class($this));

		$this->SetDefaults(array(
			'IdHelpdeskAttachment'	=> 0,
			'IdHelpdeskPost'		=> 0,
			'IdHelpdeskThread'		=> 0,
			'IdTenant'				=> 0,
			'IdOwner'				=> 0,
			'Created'				=> time(),
			'SizeInBytes'			=> 0,
			'FileName'				=> '',
			'Content'				=> '',
			'Hash'					=> ''
		));
	}
Beispiel #16
0
 /**
  * @param int $iUserId
  * @return void
  */
 public function __construct($iUserId)
 {
     parent::__construct(get_class($this), 'IdCalUser');
     $iUserId = (int) $iUserId;
     $oDomain = null;
     $oSettings =& CApi::GetSettings();
     if (0 < $iUserId) {
         /* @var $oApiUsersManager CApiUsersManager */
         $oApiUsersManager = CApi::Manager('users');
         $iDomainId = $oApiUsersManager->GetDefaultAccountDomainId($iUserId);
         if (0 < $iDomainId) {
             /* @var $oApiDomainsManager CApiDomainsManager */
             $oApiDomainsManager = CApi::Manager('domains');
             $oDomain = $oApiDomainsManager->GetDomainById($iDomainId);
         }
     }
     $this->SetDefaults(array('IdCalUser' => 0, 'IdUser' => (int) $iUserId, 'ShowWeekEnds' => (bool) ($oDomain ? $oDomain->CalendarShowWeekEnds : $oSettings->GetConf('Calendar/ShowWeekEnds')), 'ShowWorkDay' => (bool) ($oDomain ? $oDomain->CalendarShowWorkDay : $oSettings->GetConf('Calendar/ShowWorkDay')), 'WorkDayStarts' => (int) ($oDomain ? $oDomain->CalendarWorkdayStarts : $oSettings->GetConf('Calendar/WorkdayStarts')), 'WorkDayEnds' => (int) ($oDomain ? $oDomain->CalendarWorkdayEnds : $oSettings->GetConf('Calendar/WorkdayEnds')), 'WeekStartsOn' => (int) ($oDomain ? $oDomain->CalendarWeekStartsOn : $oSettings->GetConf('Calendar/WeekStartsOn')), 'DefaultTab' => (int) ($oDomain ? $oDomain->CalendarDefaultTab : $oSettings->GetConf('Calendar/DefaultTab'))));
     CApi::Plugin()->RunHook('api-caluser-construct', array(&$this));
 }
 public function __construct()
 {
     parent::__construct(get_class($this), 'Id');
     $this->__USE_TRIM_IN_STRINGS__ = true;
     $this->SetDefaults(array('Id' => 0, 'AccountId' => 0, 'DataValue' => ETwofaType::AUTH_TYPE_AUTHY, 'DataType' => ETwofaType::DATA_TYPE_AUTHY_ID));
 }
Beispiel #18
0
 public function __construct()
 {
     parent::__construct(get_class($this), 'Id');
     $this->__USE_TRIM_IN_STRINGS__ = true;
     $this->SetDefaults(array('Id' => 0, 'IdTenant' => 0, 'SocialAllow' => false, 'SocialName' => '', 'SocialId' => '', 'SocialSecret' => '', 'SocialApiKey' => null, 'SocialScopes' => '', 'SupportedScopes' => array(), 'TranslatedScopes' => array(), 'HasApiKey' => false));
 }
 public function __construct()
 {
     parent::__construct(get_class($this), 'IdSubscription');
     $this->__USE_TRIM_IN_STRINGS__ = true;
     $this->SetDefaults(array('IdSubscription' => 0, 'IdTenant' => 0, 'Name' => '', 'Description' => '', 'Capa' => '', 'Limit' => 0));
 }