public static function createTransportFiles(&$helpers, $mode = MODE_BOOTSTRAP) { /* @var $helpers Helpers */ $helpers->sendLog(modX::LOG_LEVEL_INFO, "\n" . ' ' . $helpers->modx->lexicon('mc_processing_system_settings')); $settings = $helpers->modx->getOption('newSystemSettings', ObjectAdapter::$myObjects, array()); parent::createTransportFile($helpers, $settings, '', 'modSystemSetting', $mode); }
/** * Set thing up for ObjectAdapter to create transport files * @param $helpers * @param int $mode */ public static function createTransportFiles(&$helpers, $mode = MODE_BOOTSTRAP) { /* @var $helpers Helpers */ $categories = $helpers->modx->getOption('ElementCategories', ObjectAdapter::$myObjects, array()); if (empty($categories)) { $helpers->sendLog(modX::LOG_LEVEL_INFO, ' ' . $helpers->modx->lexicon('mc_no_elements_to_process')); return; } foreach ($categories as $category => $elementList) { $category = strtolower($category); $helpers->sendLog(modX::LOG_LEVEL_INFO, "\n" . $helpers->modx->lexicon('mc_processing_transport_files_for_category') . ': ' . $category); foreach ($elementList['elements'] as $type => $elements) { $helpers->sendLog(modX::LOG_LEVEL_INFO, "\n" . ' ' . $helpers->modx->lexicon('mc_processing') . ' ' . $type); foreach ($elements as $k => $fields) { $alias = $helpers->getNameAlias($type); $helpers->sendLog(modX::LOG_LEVEL_INFO, ' ' . $helpers->modx->lexicon('mc_processing_object') . ': ' . $fields[$alias]); } parent::createTransportFile($helpers, $elements, $category, $type, $mode); } } }