TYPO3 CMS  TYPO3_6-2
ContextHelpDataProvider.php
Go to the documentation of this file.
1 <?php
3 
23 
31  public function getContextHelp($table, $field) {
32  $helpTextArray = \TYPO3\CMS\Backend\Utility\BackendUtility::helpTextArray($table, $field);
33  $moreIcon = $helpTextArray['moreInfo'] ? \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-forward') : '';
34  return array(
35  'title' => $helpTextArray['title'],
36  'description' => '<p class="t3-help-short' . ($moreIcon ? ' tipIsLinked' : '') . '">' . $helpTextArray['description'] . $moreIcon . '</p>',
37  'id' => $table . '.' . $field,
38  'moreInfo' => $helpTextArray['moreInfo']
39  );
40  }
41 
48  public function getTableContextHelp($table) {
49  $output = array();
50  if (!isset($GLOBALS['TCA_DESCR'][$table]['columns'])) {
51  $GLOBALS['LANG']->loadSingleTableDescription($table);
52  }
53  if (is_array($GLOBALS['TCA_DESCR'][$table]) && is_array($GLOBALS['TCA_DESCR'][$table]['columns'])) {
54  $arrow = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-forward');
55  foreach ($GLOBALS['TCA_DESCR'][$table]['columns'] as $field => $data) {
56  $output[$field] = array(
57  'description' => NULL,
58  'title' => NULL,
59  'moreInfo' => FALSE,
60  'id' => $table . '.' . $field
61  );
62  // Add alternative title, if defined
63  if ($data['alttitle']) {
64  $output[$field]['title'] = $data['alttitle'];
65  }
66  // If we have more information to show
67  if ($data['image_descr'] || $data['seeAlso'] || $data['details'] || $data['syntax']) {
68  $output[$field]['moreInfo'] = TRUE;
69  }
70  // Add description
71  if ($data['description']) {
72  $output[$field]['description'] = $data['description'] . ($output[$field]['moreInfo'] ? $arrow : '');
73  }
74  }
75  }
76  return $output;
77  }
78 
79 }
static getSpriteIcon($iconName, array $options=array(), array $overlays=array())
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]