The Inx_Api_Property_PropertyFormatter is used for converting property values.
The Inx_Api_Property_PropertyFormatter is used for converting property values. At the moment it is only used for converting the approval property to and from the internal string representation. An Inx_Api_Property_PropertyFormatter can be obtained by calling Inx_Api_Property_Property::getFormatter(). The following snippet shows how to retrieve and parse the approval property of the specified list:
$oListContext = $oSession->getListContextManager()->findByName( "Desired list" ); $oProperty = $oListContext->findProperty( Inx_Api_Property_PropertyNames::APPROVAL_ACTIVE ); $oPropertyFormatter = $oProperty->getFormatter(); $oApprovalPropertyValue = $oPropertyFormatter->parseApprovalPropertyValue( $oProperty ); echo "Approval type: ".$oApprovalPropertyValue->getApprovalType()."<br>"; echo "Primary approver: ".$oApprovalPropertyValue->getPrimaryApproverId()."<br>"; echo "Secondary approver: ".$oApprovalPropertyValue->getSecondaryApproverId()."<br>";It is also possible to convert an Inx_Api_Property_ApprovalPropertyValue into the internal string representation. The following snippet shows how to update the approval process policy of the specified list:
$iPrimaryApproverId = ... $iSecondaryApproverId = ... $oListContext = $oSession->getListContextManager()->findByName("Desired list"); $oProperty = $oListContext->findProperty(Inx_Api_Property_PropertyNames::APPROVAL_ACTIVE); $oPropertyFormatter = $oProperty->getFormatter(); $oApprovalPropertyValue = new Inx_Api_Property_ApprovalPropertyValue( Inx_Api_Property_ApprovalPropertyValue::APPROVAL_TYPE_ESCALATION, $iPrimaryApproverId, $iSecondaryApproverId); $oProperty->updateInternalValue($oPropertyFormatter->createApprovalPropertyValue($oApprovalPropertyValue)); $oProperty->commitUpdate();
For more information on the approval property and the possible approval types, see the Inx_Api_Propterty_ApprovalPropertyValue documentation.
For more information on properties in general, see the Inx_Api_Property_Property documentation.
Located in /Api/Property/PropertyFormatter.php (line 53)
Creates the internal value string for the given Inx_Api_Property_ApprovalPropertyValue which is used for Inx_Api_Property_Property::updateInternalValue($sValue).
Creates the internal value string for the given Inx_Api_Property_ApprovalPropertyValue which is used for Inx_Api_Property_Property::updateInternalValue($sValue).
Parses a property and creates an Inx_Api_Property_ApprovalPropertyValue object containing the approval process policy.
Parses a property and creates an Inx_Api_Property_ApprovalPropertyValue object containing the approval process policy. This object can be used to easily retrieve the specifics of the approval process policy.
Documentation generated on Thu, 17 Sep 2015 14:27:28 +0200 by phpDocumentor 1.3.2