#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "\$organization\['(.1*?)"
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\['\U\1\E"
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