Contains information on the organization of the current User

see
package Gems
subpackage User
copyright Copyright (c) 2011 Erasmus MC
license New BSD License
since Class available since version 1.5
inherited_from \Gems_Registry_CachedArrayTargetAbstract

 Methods

Creates the object.

__construct(mixed $id) 
Inherited

Parameters

$id

mixed

Whatever identifies this object.

Returns a callable if a method is called as a variable

__get(string $name) : Callable
Inherited

Parameters

$name

string

Returns

Callable

When true respondents of this organization may login

allowsRespondentLogin() : boolean

Returns

boolean

Set menu parameters from the organization

applyToMenuSource(\Gems_Menu_ParameterSource $source) : \Gems_Tracker_Token

Parameters

$source

\Gems_Menu_ParameterSource

Returns

\Gems_Tracker_Token(continuation pattern)

Returns true when this organization has or can have respondents

canCreateRespondents() : boolean

Returns

boolean

Returns true when this organization has or can have respondents

canHaveRespondents() : boolean

Returns

boolean

Should be called after answering the request to allow the Target to check if all required registry values have been set correctly.

checkRegistryRequestsAnswers() : boolean
Inherited

Returns

booleanFalse if required are missing.

Does the code attribute contain this code (with multiple codes seperated by a space)

containsCode(string $checkCode) : boolean

Parameters

$checkCode

string

Returns

boolean

Returns true if this is an existing organization

exists() : boolean

Returns

boolean

Returns the $key in organizationData when set otherwise the default value

get(string $key, mixed $default = null) : mixed

Parameters

$key

string

$default

mixed

Returns

mixed

Get the allowed_ip_ranges attribute.

getAllowedIpRanges() : string

Returns

string

Get the organizations this organizations can access.

getAllowedOrganizations() : array

Returns

arrayOf type orgId => orgName

Get the code attribute.

getCode() : string

Returns

string

Get the contact name attribute.

getContactName() : string

Returns

string

getCreateAccountTemplate()

getCreateAccountTemplate() 

Get the email attribute.

getEmail() : string

Returns

string

Returns the from address

getFrom() : string

Returns

stringE-Mail address

Get the organization id.

getId() : integer

Returns

integer

Return org dependent login url

getLoginUrl() : string

Returns

string

Array of field name => values for sending E-Mail

getMailFields() : array

Returns

array

Get the name of the organization.

getName() : string

Returns

string

Get the template id for the reset password mail

getResetPasswordTemplate() : integer

Returns

integerTemplate ID

Get the signature of the organization.

getSignature() : string

Returns

string

Get the style attribute.

getStyle() : string

Returns

string

Get the welcome message for the organization.

getWelcome() : string

Returns

string

Has org an email attribute?

hasEmail() : boolean

Returns

boolean

Does this organization have a user group?

hasRespondentGroup() : boolean

Returns

boolean

Empty the cache of the organization

invalidateCache() : \Gems_User_Organization
Inherited

Returns

\Gems_User_Organization(continutation pattern)

Set this organization as teh one currently active

setAsCurrentOrganization() : \Gems_User_Organization

Returns

\Gems_User_Organization(continutation pattern)

Tell the organization there is at least one respondent attached to it.

setHasRespondents(integer $userId) : \Gems_User_Organization

Does nothing if this is already known.

Parameters

$userId

integer

The current user

Returns

\Gems_User_Organization(continutation pattern)

isset() safe array access helper function.

_get(string $name) : mixed
Inherited

Parameters

$name

string

Returns

mixed

array access test helper function.

_has(string $name) : boolean
Inherited

Parameters

$name

string

Returns

boolean

Changes a value and signals the cache.

_set(string $name, mixed $value) : \Gems_Registry_CachedArrayTargetAbstract
Inherited

Parameters

$name

string

$value

mixed

Returns

\Gems_Registry_CachedArrayTargetAbstract(continuation pattern)

Load the data when the cache is empty.

loadData(mixed $id) : array
inherited_from \Gems_Registry_CachedArrayTargetAbstract::loadData()

Parameters

$id

mixed

Returns

arrayThe array of data values

Load the data when the cache is empty.

loadData(mixed $id) : array
Inherited

Parameters

$id

mixed

Returns

arrayThe array of data values

Get the cacheId for the organization

_getCacheId() : string
Inherited

Returns

string

 Properties

 

Does this data item exist?

$exists : boolean

Default

false
 

Variable to add tags to the cache for cleanup.

$_cacheTags : array

Default

array('organization')
inherited_from \Gems_Registry_CachedArrayTargetAbstract::_cacheTags
 

Variable to add tags to the cache for cleanup.

$_cacheTags : array

Default

array()
 

The current data.

$_data : array

Default

 

The id for this data

$_id : mixed

Default

 

The default organization data for 'no organization'.

$_noOrganization : array

Default

array('gor_id_organization' => 1, 'gor_name' => 'NO ORGANIZATION', 'gor_iso_lang' => 'en', 'gor_has_respondents' => 0, 'gor_add_respondents' => 0, 'gor_active' => 0, 'can_access' => array())
 

Required

$basepath : \Gems_Util_BasePath

Default

 

$cache

$cache : \Zend_Cache_Core

Default

 

$db

$db : \Zend_Db_Adapter_Abstract

Default

 

$project

$project : \Gems_Project_ProjectSettings

Default

 

Return false on checkRegistryRequestsAnswers when the anser is not an array

$requireArray : boolean

Default

true
 

$util

$util : \Gems_Util

Default