#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "\$organization\['(.*?)'\]"
Local $sString = "<?php $view->extend('layout.html.php') ?>" & @CRLF & _
"<div class="boxContainer contentContainer textContainer">" & @CRLF & _
" <?php //echo $this->partial('common/notifications.phtml', 'default'," & @CRLF & _
" //array('messages' => $this->notificationMessages)); ?>" & @CRLF & _
" <?php echo $view->render(':scripts:common/notifications.html.php') ?>" & @CRLF & _
"" & @CRLF & _
" <h2 class="contentHeader"><span><?php echo $view['translator']->trans('om.organization.detail.heading', [], 'om');?></span></h2>" & @CRLF & _
" <div class="detail">" & @CRLF & _
"" & @CRLF & _
" <!-- Organization -->" & @CRLF & _
" <?php if (!empty($organization['Name'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.name', [], 'om');?><span data-igo-help-tooltip="help.om.organization.name.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $view->escape($organization['Name']);?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (isset($organization['Active'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.active', [], 'om');?><span data-igo-help-tooltip="help.om.organization.active.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php /* @fixme echo $this->stateImage($organization['Active'] ? 'ACTIVE' : 'INACTIVE') ." & @CRLF & _
" ' ' . $this->booleanMessage($organization['Active']); */?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['Type'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.type', [], 'om');?><span data-igo-help-tooltip="help.om.organization.type.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $view->escape($view['translator']->trans('om.organization.type.' . $organization['Type'], [], 'om')); ?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['OwnerOrganizationId'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.ownerOrganization', [], 'om');?><span data-igo-help-tooltip="help.om.organization.ownerOrganization.tooltip"></span></span>" & @CRLF & _
" <span class="field">" & @CRLF & _
" <?php // echo $this->entityReference('organization', $organization['OwnerOrganizationId']); ?>" & @CRLF & _
" </span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($childOrganizations)): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.childOrganizations', [], 'om');?><span data-igo-help-tooltip="help.om.organization.childOrganizations.tooltip"></span></span>" & @CRLF & _
" <span class="field">" & @CRLF & _
" <?php for ($i = 0; $i < count($childOrganizations); $i++): ?>" & @CRLF & _
" <?php" & @CRLF & _
" echo $childOrganizations[$i]['name'];" & @CRLF & _
" ?>" & @CRLF & _
" <?php if ($i < count($childOrganizations) -1 ): ?>, <?php endif; ?>" & @CRLF & _
" <?php endfor; ?>" & @CRLF & _
" </span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['CountryIds'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.countryIds', [], 'om');?><span data-igo-help-tooltip="help.om.organization.countryIds.tooltip"></span></span>" & @CRLF & _
" <span class="field">" & @CRLF & _
" <?php foreach ($organization['CountryIds'] as $countryId): ?>" & @CRLF & _
" <?php // echo $view->escape($this->country($countryId)->getCountryName()); ?><br />" & @CRLF & _
" <?php endforeach; ?>" & @CRLF & _
" </span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['LanguageCodes'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.languageCodes', [], 'om');?><span data-igo-help-tooltip="help.om.organization.languageCodes.tooltip"></span></span>" & @CRLF & _
" <span class="field">" & @CRLF & _
" <?php" & @CRLF & _
" for ($i = 0; $i < count($organization['LanguageCodes']); $i++) {" & @CRLF & _
" if (!empty($organization['LanguageCodes'][$i])) {" & @CRLF & _
" // echo $this->entityReference('language', trim($organization['LanguageCodes'][$i]));" & @CRLF & _
" if ($i !== count($organization['LanguageCodes']) - 1) {" & @CRLF & _
" echo ', ';" & @CRLF & _
" }" & @CRLF & _
" }" & @CRLF & _
" }" & @CRLF & _
" ?>" & @CRLF & _
" </span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['Roles'])):?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.person.roles', [], 'om'); ?><span data-igo-help-tooltip="help.om.organization.roles.tooltip"></span></span>" & @CRLF & _
" <span class="field">" & @CRLF & _
" <?php for ($i = 0; $i < count($organization['Roles']); $i++) :?>" & @CRLF & _
" <?php echo $organization['Roles'][$i]['name']; ?>" & @CRLF & _
" <?php if ($i < count($organization['Roles']) -1): ?>, <?php endif; ?>" & @CRLF & _
" <?php endfor;?>" & @CRLF & _
" </span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif;?>" & @CRLF & _
" <?php if ($organization['Type'] === 'POS' & !empty($organization['Flags'])): ?>" & @CRLF & _
" <?php foreach($organization['Flags'] as $flag): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.' . $flag);?><span data-igo-help-tooltip="help.om.organization.<?= $flag ?>.tooltip"></span></span>" & @CRLF & _
" <span class="field">Yes</span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endforeach; ?>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['LogotypeFilename'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('image', [], 'om'); ?><span data-igo-help-tooltip="help.om.organization.logotypeFilename.tooltip"></span></span>" & @CRLF & _
" <span class="field">" & @CRLF & _
" <?php if ($organization['LogotypeFilename']): ?>" & @CRLF & _
" <img src="<?php echo $view->escape($organization['LogotypeFilename']); ?>"" & @CRLF & _
" alt="<?php echo $view->escape($organization['Name']); ?>"" & @CRLF & _
" title="<?php echo $view->escape($organization['Name']); ?>"/>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" </span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['Description'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.description', [], 'om');?><span data-igo-help-tooltip="help.om.organization.description.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $view->escape($organization['Description']);?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['CustomCardType'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.customCardType', [], 'om');?><span data-igo-help-tooltip="help.om.organization.customCardType.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $view->escape($organization['CustomCardType']); ?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['ContractStartDate'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.contractStartDate', [], 'om');?><span data-igo-help-tooltip="help.om.organization.contractStartDate.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $organization['ContractStartDate'];?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['ContractEndDate'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.contractEndDate', [], 'om');?><span data-igo-help-tooltip="help.om.organization.contractEndDate.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $organization['ContractEndDate'];?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['MamutId'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.mamutId', [], 'om');?><span data-igo-help-tooltip="help.om.organization.mamutId.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $organization['MamutId'];?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['ContactEmail'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.contactEmail', [], 'om');?><span data-igo-help-tooltip="help.om.organization.contactEmail.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $organization['ContactEmail'];?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <hr />" & @CRLF & _
" <!-- Contact attributes -->" & @CRLF & _
" <?php if (!empty($organization['Address1'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.address1', [], 'om');?><span data-igo-help-tooltip="help.om.organization.address1.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $view->escape($organization['Address1']);?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['Address2'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.address2', [], 'om');?><span data-igo-help-tooltip="help.om.organization.address2.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $view->escape($organization['Address2']);?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($this->postalCode['cardType'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.postalCode', [], 'om');?><span data-igo-help-tooltip="help.om.organization.postalCode.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $view->escape($organization['PostalCode']);?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['CityGeoId'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.cityGeoId', [], 'om');?><span data-igo-help-tooltip="help.om.organization.cityGeoId.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php // echo $view->escape($this->city($organization['CityGeoId'])->getCityName());?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['Phone'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.phone', [], 'om');?><span data-igo-help-tooltip="help.om.organization.phone.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $view->escape($organization['Phone']);?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['Fax'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.fax', [], 'om');?><span data-igo-help-tooltip="help.om.organization.fax.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $view->escape($organization['Fax']);?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['Email'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.email', [], 'om');?><span data-igo-help-tooltip="help.om.organization.email.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $view->escape($organization['Email']);?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
"" & @CRLF & _
" <!-- Operational attributes -->" & @CRLF & _
" <hr />" & @CRLF & _
" <?php if (!empty($organization['CreatedDate'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.createdDate', [], 'om');?><span data-igo-help-tooltip="help.om.organization.createdDate.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $organization['CreatedDate'];?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['LastModifiedDate'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.lastModifiedDate', [], 'om');?><span data-igo-help-tooltip="help.om.organization.lastModifiedDate.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $organization['LastModifiedDate'];?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['LastModifiedByUserId'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('lastModifiedByUser', [], 'common'); ?><span data-igo-help-tooltip="help.om.organization.lastModifiedByUser.tooltip"></span></span>" & @CRLF & _
" <span class="field">" & @CRLF & _
" <?php // echo $this->entityReference('user', $organization['LastModifiedByUserId']); ?>" & @CRLF & _
" </span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
"" & @CRLF & _
" <!-- Additional organization info -->" & @CRLF & _
" <?php if (!empty($organization['Websites']) ||" & @CRLF & _
" !empty($organization['TwitterLink']) ||" & @CRLF & _
" !empty($organization['FacebookLink']) ||" & @CRLF & _
" !empty($organization['StudentPopulation']) ||" & @CRLF & _
" !empty($organization['CardRetailSellingPrice'])): ?>" & @CRLF & _
" <hr />" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organizationWebsites)): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.website', [], 'om'); ?><span data-igo-help-tooltip="help.om.organization.website.tooltip"></span></span>" & @CRLF & _
" <span class="field">" & @CRLF & _
" <?php for ($i = 0; $i < $websitesCount = count($organizationWebsites); $i++) :?>" & @CRLF & _
" <a href="<?php echo $organizationWebsites[$i]; ?>" target="_blank"><?php echo $organizationWebsites[$i]; ?></a>" & @CRLF & _
" <?php if ($i != $websitesCount - 1) {" & @CRLF & _
" echo(", ");" & @CRLF & _
" } ?>" & @CRLF & _
" <?php endfor;?>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['TwitterLink'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.twitterLink', [], 'om'); ?><span data-igo-help-tooltip="help.om.organization.twitterLink.tooltip"></span></span>" & @CRLF & _
" <span class="field"><a href="<?php echo $organization['TwitterLink'];?>" target="_blank"><?php echo $organization['TwitterLink'];?></a></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['FacebookLink'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.facebookLink', [], 'om'); ?><span data-igo-help-tooltip="help.om.organization.facebookLink.tooltip"></span></span>" & @CRLF & _
" <span class="field"><a href="<?php echo $organization['FacebookLink'];?>" target="_blank"><?php echo $organization['FacebookLink'];?></a></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['StudentPopulation'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.studentPopulation', [], 'om'); ?><span data-igo-help-tooltip="help.om.organization.studentPopulation.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $organization['StudentPopulation'];?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" <?php if (!empty($organization['CardRetailSellingPrice'])): ?>" & @CRLF & _
" <div class="fieldRow">" & @CRLF & _
" <span class="label"><?php echo $view['translator']->trans('om.organization.cardRetailSellingPrice', [], 'om'); ?><span data-igo-help-tooltip="help.om.organization.cardRetailSellingPrice.tooltip"></span></span>" & @CRLF & _
" <span class="field"><?php echo $organization['CardRetailSellingPrice'];?></span>" & @CRLF & _
" </div>" & @CRLF & _
" <?php endif; ?>" & @CRLF & _
" </div>" & @CRLF & _
"</div>" & @CRLF & _
"<?php if (Default_Model_SecurityUtils::hasPermission('ROLE_OM_ORGANIZATION_READ')): ?>" & @CRLF & _
"<div class="pageControls">" & @CRLF & _
" <div class="left">" & @CRLF & _
" <?php // @FIXME $defaultBackUrl = $this->url(array('controller' => 'organizations', 'action' => 'search', 'module' => 'om'), 'default'); ?>" & @CRLF & _
" <a class="btn btn-link" href="<?php // echo $this->backUrl($defaultBackUrl); ?>"><?php echo $view['translator']->trans('back', [], 'common'); ?></a>" & @CRLF & _
" </div>" & @CRLF & _
" <div class="right">" & @CRLF & _
" <?php" & @CRLF & _
" // @FIXME $targetUrl = $this->url(array('action' => 'edit', 'id' => $organization['OrganizationId']), 'resource');" & @CRLF & _
" ?>" & @CRLF & _
" <?php //@FIXME echo $this->renderButton('edit', array('style' => 'wlw', 'align' => 'right'," & @CRLF & _
" //'href' => $this->backUrlAppend($targetUrl))); ?>" & @CRLF & _
" </div>" & @CRLF & _
" <div class="clearer"></div>" & @CRLF & _
"</div>" & @CRLF & _
"<?php endif; ?>" & @CRLF & _
""
Local $sSubst = "\$organization->get$1()"
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm