Interface Inx_Api_Recipient_AttributeManager

Description

Using the Inx_Api_Recipient_AttributeManager, attributes (columns) can be manipulated.

Using the Inx_Api_Recipient_AttributeManager, attributes (columns) can be manipulated. The following operations can be performed using the AttributeManager:

  • Creating attributes: create(String, int, int)
  • Removing user attributes: remove(Attribute)
  • Renaming user attributes: rename(Attribute, String)
  • Checking list visibility: isAttributeVisibleInList(Attribute, int) and areAttributesVisibleInList(List, int)
  • Setting list visibility: setAttributeListVisibility(Attribute, int, boolean) and setAttributeListVisibilities(List, int, boolean)
  • Setting global visibility: setGlobalAttributeVisibility(Attribute, boolean) and setGlobalAttributeVisibilities(List, boolean)
Note: Changing the data type of an attribute is not supported by the AttributeManager. This is a possibly dangerous operation that should - if at all - be performed using the client which can provide guidance and assistance in converting attributes from on type into another.

The AttributeManager can not be used to change attribute values for recipients. This is performed using the Inx_Api_Recipient_RecipientContext. See the RecipientContext documentation for more information on this topic.

Following example illustrates how to create a new text attribute with a length of 50 characters:

 $oSession->getAttributeManager()->create( "Firstname", Inx_Api_Recipient_Attribute::DATA_TYPE_STRING, 50 );

For more information on Attributes in general, see the Inx_Api_Recipient_Attribute documentation.

Located in /Api/Recipient/AttributeManager.php (line 44)


	
			
Method Summary
array areAttributesVisibleInList (array $aAttributes, int $iListId)
the create (attributeName $sAttributeName, dataType $iDataType, maxStringLenth $iMaxStringLenth)
bool isAttributeVisibleInList (Inx_Api_Recipient_Attribute $oAttribute, int $iListId)
boolean remove ([Inx_Api_Recipient_Attribute $oAttribute = null])
boolean rename (Inx_Api_Recipient_Attribute $oAttribute, string $sAttributeName)
void setAttributeListVisibilities (array $aAttributes, int $iListId, bool $blVisible)
void setAttributeListVisibility (Inx_Api_Recipient_Attribute $oAttribute, int $iListId, bool $blVisible)
void setGlobalAttributeVisibilities (array $aAttributes, bool $blVisible)
void setGlobalAttributeVisibility (Inx_Api_Recipient_Attribute $oAttribute, bool $blVisible)
Methods
areAttributesVisibleInList (line 102)

Checks whether the given attributes are visible in the specified list.

Checks whether the given attributes are visible in the specified list. The result is an associative array where the attribute id is the key and the value is a bool indicating the visibility of the attribute.

  • return: an associative array containing int/bool pairs.
  • since: API 1.10.0
  • access: public
array areAttributesVisibleInList (array $aAttributes, int $iListId)
  • array $aAttributes: a list of Inx_Api_Recipient_Attributes to check.
  • int $iListId: the id of the list to check.
create (line 58)

Create a new user attribute.

Create a new user attribute.

  • return: attribute id of the new attribute
  • see: Inx_Api_Recipient_Attribute
  • throws: Inx_Api_NameException if the attribute name is illegal or already exist
  • access: public
the create (attributeName $sAttributeName, dataType $iDataType, maxStringLenth $iMaxStringLenth)
  • attributeName $sAttributeName: the unique name of the attribute
  • dataType $iDataType: the data type of the attribute
  • maxStringLenth $iMaxStringLenth: the length of the string attribute (length from 1 to 255), only for Inx_Api_Recipient_Attribute::DATA_TYPE_STRING
isAttributeVisibleInList (line 89)

Checks whether the given attribute is visible in the specified list.

Checks whether the given attribute is visible in the specified list.

  • return: true if the attribute is visible in the list, false otherwise.
  • since: API 1.10.0
  • access: public
bool isAttributeVisibleInList (Inx_Api_Recipient_Attribute $oAttribute, int $iListId)
remove (line 78)

Remove a user attribute.

Remove a user attribute.

  • return: true, if the attribute is removed, otherwise false
  • access: public
boolean remove ([Inx_Api_Recipient_Attribute $oAttribute = null])
rename (line 69)

Rename a user attribute.

Rename a user attribute.

  • return: true, if the attribute is renamed, otherwise false
  • throws: Inx_Api_NameException if the attribute name is illegal or already exist
  • access: public
boolean rename (Inx_Api_Recipient_Attribute $oAttribute, string $sAttributeName)
setAttributeListVisibilities (line 131)

Sets the visibility of a list of attributes (columns) in a specific list.

Sets the visibility of a list of attributes (columns) in a specific list. Some attributes, like the email attribute, may not be shown or hidden and will therefore trigger an Inx_Api_APIException. If the list contains such an attribute, none of the attributes will be modified.

  • throws: Inx_Api_APIException if at least one attribute can not be shown / hidden.
  • since: API 1.9.0
  • access: public
void setAttributeListVisibilities (array $aAttributes, int $iListId, bool $blVisible)
  • array $aAttributes: a list of Inx_Api_Recipient_Attributes to show or hide.
  • int $iListId: the id of the list in which the attributes shall be shown or hidden.
  • bool $blVisible: true if the attributes shall be shown,
setAttributeListVisibility (line 116)

Sets the visibility of an attribute (column) in a specific list.

Sets the visibility of an attribute (column) in a specific list. Some attributes, like the email attribute, may not be shown or hidden and will therefore trigger an Inx_Api_APIException.

  • throws: Inx_Api_APIException if the attribute can not be shown / hidden.
  • since: API 1.9.0
  • access: public
void setAttributeListVisibility (Inx_Api_Recipient_Attribute $oAttribute, int $iListId, bool $blVisible)
  • Inx_Api_Recipient_Attribute $oAttribute: the attribute to show or hide.
  • int $iListId: the id of the list in which the attribute shall be shown or hidden.
  • bool $blVisible: true if the attribute shall be shown, false if it shall be hidden.
setGlobalAttributeVisibilities (line 158)

Sets the visibility of a list of attributes (columns) in all lists.

Sets the visibility of a list of attributes (columns) in all lists. Some attributes, like the email attribute, may not be shown or hidden and will therefore trigger an Inx_Api_APIException. If the list contains such an attribute, none of the attributes will be modified.

  • throws: Inx_Api_APIException if at least one attribute can not be shown / hidden.
  • since: API 1.9.0
  • access: public
void setGlobalAttributeVisibilities (array $aAttributes, bool $blVisible)
  • array $aAttributes: a list of Inx_Api_Recipient_Attributes to show or hide.
  • bool $blVisible: true if the attributes shall be shown, false if they shall be hidden.
setGlobalAttributeVisibility (line 144)

Sets the visibility of an attribute (column) in all lists.

Sets the visibility of an attribute (column) in all lists. Some attributes, like the email attribute, may not be shown or hidden and will therefore trigger an Inx_Api_APIException.

  • throws: Inx_Api_APIException if the attribute can not be shown / hidden.
  • since: API 1.9.0
  • access: public
void setGlobalAttributeVisibility (Inx_Api_Recipient_Attribute $oAttribute, bool $blVisible)
  • Inx_Api_Recipient_Attribute $oAttribute: the attribute to show or hide.
  • bool $blVisible: true if the attribute shall be shown, false if it shall be hidden.

Documentation generated on Thu, 17 Sep 2015 14:27:21 +0200 by phpDocumentor 1.3.2