The Inx_Api_TextModule_TextModuleManager can be used to retrieve and create text modules.
The Inx_Api_TextModule_TextModuleManager can be used to retrieve and create text modules. Text modules are reusable text snippets that can be used inside mailings in the same list (or all lists if the text module is defined in the system list). A common text module is a custom, personalized salutation. The following snippet shows how to create a new text module and update its name:
$oTextmoduleManager = $oSession->getTextmoduleManager(); $oListContext = $oSession->getListContextManager()->findByName( "Desired List" ); $oTextModule = $oTextmoduleManager->createTextmodule( $oListContext, Inx_Api_TextModule_TextModule::MIME_TYPE_HTML_TEXT ); $oTextModule->updateName( "Desired name" ); $oTextModule->commitUpdate();
To retrieve existing text modules, use one of the two select methods provided by this manager. The following snippet shows how to retrieve all global text modules, ordered by their name, and prints out some information regarding these text modules:
$oTextmoduleManager = $oSession->getTextmoduleManager(); $oListContext = $oSession->getListContextManager()->findByName( Inx_Api_List_SystemListContext::NAME ); $oBOResultSet = $oTextmoduleManager->select( $oListContext, Inx_Api_TextModule_TextModule::ATTRIBUTE_NAME, Inx_Api_Order::DESC ); for( $i = 0; $i < $oBOResultSet->size(); $i++ ) { $oTextModule = $oBOResultSet->get( $i ); echo "Textmodule ".$oTextModule->getName()." has the content type ".$oTextModule->getMimeType()."<br>"; } $oBOResultSet->close();For more information on text modules, see the Inx_Api_TextModule_TextModule documentation.
Located in /Api/TextModule/TextModuleManager.php (line 51)
Inx_Api_BOManager | --Inx_Api_TextModule_TextModuleManager
Creates a new text module in the specified list.
Creates a new text module in the specified list. To create a globally available text module, use the SystemListContext. The SystemListContext can be retrieved using the following snippet:
$oListContext = $oSession->getListContextManager()->findByName( Inx_Api_List_SystemListContext::NAME );
Returns an Inx_Api_BOResultSet containing all text modules in the specified list, ordered by the given attribute.
Returns an Inx_Api_BOResultSet containing all text modules in the specified list, ordered by the given attribute.
Inherited From Inx_Api_BOManager
Inx_Api_BOManager::get()
Inx_Api_BOManager::remove()
Inx_Api_BOManager::selectAll()
Documentation generated on Thu, 17 Sep 2015 14:27:32 +0200 by phpDocumentor 1.3.2