TYPO3 CMS  TYPO3_6-2
DefinitionList.php
Go to the documentation of this file.
1 <?php
3 
22 
23  protected $extensionKey = 'rtehtmlarea';
24 
25  // The key of the extension that is extending htmlArea RTE
26  protected $pluginName = 'DefinitionList';
27 
28  // The name of the plugin registered by the extension
30 
31  // Path to this main locallang file of the extension relative to the extension dir.
32  protected $relativePathToSkin = 'extensions/DefinitionList/skin/htmlarea.css';
33 
34  // Path to the skin (css) file relative to the extension dir.
35  protected $htmlAreaRTE;
36 
37  // Reference to the invoking object
38  protected $thisConfig;
39 
40  // Reference to RTE PageTSConfig
41  protected $toolbar;
42 
43  // Reference to RTE toolbar array
44  protected $LOCAL_LANG;
45 
46  // Frontend language array
47  protected $pluginButtons = 'definitionlist, definitionitem';
48 
50  'definitionlist' => 'DefinitionList',
51  'definitionitem' => 'DefinitionItem'
52  );
53 
54  // The comma-separated list of names of prerequisite plugins
55  protected $requiredPlugins = 'BlockElements';
56 
57  public function main($parentObject) {
58  $enabled = parent::main($parentObject) && $this->htmlAreaRTE->isPluginEnabled('BlockElements');
59  if ($enabled && is_object($this->htmlAreaRTE->registeredPlugins['BlockElements'])) {
60  $this->htmlAreaRTE->registeredPlugins['BlockElements']->setSynchronousLoad();
61  }
62  return $enabled;
63  }
64 
71  public function buildJavascriptConfiguration($RTEcounter) {
72  global $TSFE, $LANG;
73  $registerRTEinJavascriptString = '';
74  return $registerRTEinJavascriptString;
75  }
76 
83  public function applyToolbarConstraints($show) {
84  $blockElementsButtons = 'formatblock, indent, outdent, blockquote, insertparagraphbefore, insertparagraphafter, left, center, right, justifyfull, orderedlist, unorderedlist';
85  $notRemoved = array_intersect(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $blockElementsButtons, TRUE), $show);
86  // DefinitionList plugin requires BlockElements plugin
87  // We will not allow any definition lists operations if all block elements buttons were disabled
88  if (empty($notRemoved)) {
89  return array_diff($show, \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->pluginButtons));
90  } else {
91  return $show;
92  }
93  }
94 
95 }
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
$TSFE
Definition: index_ts.php:72