/** * @param $strTable * @return array */ protected function getHelpwizardReferencesBy($strTable) { $arrReferences = array(); Controller::loadLanguageFile($strTable); Controller::loadDataContainer($strTable); if (isset($GLOBALS['TL_DCA'][$strTable]['fields']) && is_array($GLOBALS['TL_DCA'][$strTable]['fields'])) { foreach ($GLOBALS['TL_DCA'][$strTable]['fields'] as $strField => $arrValues) { $strLabel = $strField; if (isset($arrValues['label'][0]) && strlen($arrValues['label'][0])) { $strLabel = $arrValues['label'][0]; } $arrReferences[] = array(sprintf('{{%s::%s|%s}}', 'accountmail', $strField, 'refresh'), sprintf($GLOBALS['TL_LANG']['MSC']['helpwizard_insert_tag'], $strLabel)); } } return $arrReferences; }
/** * Generate the icons by the given conditions. * * @param array $row The current record. * * @return string */ public function generateDeviceConditionConfiguration($row) { if (!Input::get('do') == 'article' || !Input::get('do') == 'postmanager' || Input::get('task') == 'indexmanager') { return; } $conditions = deserialize($row['device_condition']); $allConditions = array('desktop', 'mobile'); $return = ''; Controller::loadLanguageFile('default'); if (!$conditions) { foreach ($allConditions as $condition) { $return .= Image::getHtml('/system/modules/z_device-condition/assets/icons/' . $condition . '.png', $this->getTranslationForCondition($condition)); } } else { foreach ($allConditions as $condition) { if (in_array($condition, $conditions)) { $return .= Image::getHtml('/system/modules/z_device-condition/assets/icons/' . $condition . '.png', $this->getTranslationForCondition($condition)); } else { $return .= Image::getHtml('/system/modules/z_device-condition/assets/icons/disabled/' . $condition . '.png', $this->getTranslationForCondition($condition)); } } } return $return; }