\org_openpsa_widgets_contact

Base class used for writing pure code components, retrieves a few common variables from the component's current environment.

Note, that the request data, for ease of use, already contains the L10n Databases of the Component and MidCOM itself located in this class. They are stored as 'l10n' and 'l10n_midcom'. Also available as 'config' is the current component configuration.

Summary

Methods
Properties
Constants
__construct()
__get()
__isset()
set_active_leaf()
add_stylesheet()
get_workflow()
add_head_elements()
get()
show_inline()
show()
show_address_card()
$_component
$contact_details
$link
$extra_html
$prefix_html
$show_groups
$link_contacts
$_i18n
$_l10n
$_l10n_midcom
$_config
No constants found
No protected methods found
No protected properties found
N/A
read_object()
_render_name()
_show_phone_number()
_show_groups()
$_services
$_data_read_ok
$_contacts_url
N/A

Properties

$_component

$_component : string

The name of the component, e.g. net.nehmer.static. Should be used whenever the component's name is required instead of hardcoding it.

Type

string

$contact_details

$contact_details : 

Contact information of the person being displayed

Type

$link

$link : string

Optional URI to person details

Type

string

$extra_html

$extra_html : string

Optional HTML to be placed into the card

Type

string

$prefix_html

$prefix_html : string

Optional HTML to be placed into the card (before any other output in the DIV)

Type

string

$show_groups

$show_groups : boolean

Whether to show person's groups in a list

Type

boolean

$link_contacts

$link_contacts : boolean

Whether to generate links to the groups using NAP

Type

boolean

$_i18n

$_i18n : \midcom_services_i18n

A handle to the i18n service.

Type

\midcom_services_i18n

$_l10n

$_l10n : \midcom_services_i18n_l10n

The components' L10n string database.

Type

\midcom_services_i18n_l10n

$_l10n_midcom

$_l10n_midcom : \midcom_services_i18n_l10n

The global MidCOM string database.

Type

\midcom_services_i18n_l10n

$_config

$_config : \midcom_helper_configuration

The current configuration.

Type

\midcom_helper_configuration

$_services

$_services : array

Array that holds the already instantiated services

Type

array

$_data_read_ok

$_data_read_ok : 

Do we have our contact data ?

Type

$_contacts_url

$_contacts_url : string

Default org.openpsa.contacts URL to be used for linking to groups. Will be autoprobed if not supplied.

Type

string

Methods

__construct()

__construct(mixed  $person = null) 

Initializes the class and stores the selected person to be shown The argument should be a MidgardPerson object.

Parameters

mixed $person

Person to display either as MidgardPerson

__get()

__get(  $field) 

Parameters

$field

__isset()

__isset(  $field) 

Parameters

$field

set_active_leaf()

set_active_leaf(  $leaf_id) 

Parameters

$leaf_id

add_stylesheet()

add_stylesheet(string  $url, string  $media = false) 

Convenience shortcut for adding CSS files

Parameters

string $url

The stylesheet URL

string $media

The media type(s) for the stylesheet, if any

get_workflow()

get_workflow(string  $identifier, array  $options = array()) : \midcom\workflow\dialog

Parameters

string $identifier
array $options

Returns

\midcom\workflow\dialog

add_head_elements()

add_head_elements() 

get()

get(mixed  $src) : \org_openpsa_widgets_contact

Retrieve an object, uses in-request caching

Parameters

mixed $src

GUID of object (ids work but are discouraged)

Returns

\org_openpsa_widgets_contact

show_inline()

show_inline() 

Show selected person object inline. Outputs hCard XHTML.

show()

show() 

Show the selected person. Outputs hCard XHTML.

show_address_card()

show_address_card(  $customer,   $cards) 

Renderer for organization address cards

Parameters

$customer
$cards

read_object()

read_object(  $person) 

Read properties of a person object and populate local fields accordingly

Parameters

$person

_render_name()

_render_name(  $icon = false) 

Parameters

$icon

_show_phone_number()

_show_phone_number(  $field,   $type) 

Parameters

$field
$type

_show_groups()

_show_groups()