예제 #1
0
 /**
  * Searches through all backend modules to find the linked tables for the selected global operation key
  *
  * @param \DataContainer $dc
  *
  * @return array
  */
 public static function getLinkedTablesAsOptions(\DataContainer $objDc)
 {
     $arrTables = array();
     $strGlobalOperationKey = $objDc->activeRecord->globalOperationKey;
     switch ($objDc->activeRecord->type) {
         case Exporter::TYPE_LIST:
             if ($strGlobalOperationKey) {
                 foreach ($GLOBALS['BE_MOD'] as $arrSection) {
                     foreach ($arrSection as $strModule => $arrModule) {
                         foreach ($arrModule as $strKey => $varValue) {
                             if ($strKey === $strGlobalOperationKey) {
                                 $arrTables[$strModule] = $arrModule['tables'];
                             }
                         }
                     }
                 }
             }
             break;
         default:
             $arrTables = General::getDataContainers();
     }
     return $arrTables;
 }