Documentation TYPO3 par Ameos

clickMenu Class Reference

List of all members.

Public Member Functions

 init ($item)
 doDisplayTopFrameCM ()
 printDBClickMenu ($table, $uid)
 printNewDBLevel ($table, $uid)
 externalProcessingOfDBMenuItems ($menuItems)
 processingByExtClassArray ($menuItems, $table, $uid)
 urlRefForCM ($url, $retUrl='', $hideCM=1)
 DB_copycut ($table, $uid, $type)
 DB_paste ($table, $uid, $type, $elInfo)
 DB_info ($table, $uid)
 DB_history ($table, $uid)
 DB_perms ($table, $uid, $rec)
 DB_db_list ($table, $uid, $rec)
 DB_moveWizard ($table, $uid, $rec)
 DB_newWizard ($table, $uid, $rec)
 DB_editAccess ($table, $uid)
 DB_editPageHeader ($uid)
 DB_edit ($table, $uid)
 DB_new ($table, $uid)
 DB_delete ($table, $uid, $elInfo)
 DB_view ($id, $anchor='')
 DB_tempMountPoint ($page_id)
 DB_hideUnhide ($table, $rec, $hideField)
 DB_changeFlag ($table, $rec, $flagField, $title, $name, $iconRelPath='gfx/')
 printFileClickMenu ($path)
 externalProcessingOfFileMenuItems ($menuItems)
 FILE_launch ($path, $script, $type, $image)
 FILE_copycut ($path, $type)
 FILE_delete ($path)
 FILE_paste ($path, $target, $elInfo)
 printItems ($menuItems, $item)
 printLayerJScode ($menuItems)
 wrapColorTableCM ($str)
 menuItemsForTopFrame ($menuItems)
 menuItemsForClickMenu ($menuItems)
 addMenuItems ($menuItems, $newMenuItems, $position='')
 linkItem ($str, $icon, $onClick, $onlyCM=0, $dontHide=0)
 excludeIcon ($iconCode)
 enableDisableItems ($menuItems)
 cleanUpSpacers ($menuItems)
 label ($label)
 isCMlayers ()
 frameLocation ($str)

Public Attributes

 $cmLevel = 0
 $CB
 $backPath = ''
 $PH_backPath = '###BACK_PATH###'
 $listFrame = 0
 $isDBmenu = 0
 $alwaysContentFrame = 0
 $iParts = array()
 $disabledItems = array()
 $dontDisplayTopFrameCM = 0
 $leftIcons = 0
 $extClassArray = array()
 $elCount = 0
 $editPageIconSet = 0
 $editOK = 0
 $rec = array()

Detailed Description

Definition at line 128 of file alt_clickmenu.php.


Member Function Documentation

clickMenu::addMenuItems menuItems,
newMenuItems,
position = ''
 

Adds or inserts a menu item Can be used to set the position of new menu entries within the list of existing menu entries. Has this syntax: [cmd]:[menu entry key],[cmd].... cmd can be "after", "before" or "top" (or blank/"bottom" which is default). If "after"/"before" then menu items will be inserted after/before the existing entry with [menu entry key] if found. "after-spacer" and "before-spacer" do the same, but inserts before or after an item and a spacer. If not found, the bottom of list. If "top" the items are inserted in the top of the list.

Parameters:
array Menu items array
array Menu items array to insert
string Position command string. Has this syntax: [cmd]:[menu entry key],[cmd].... cmd can be "after", "before" or "top" (or blank/"bottom" which is default). If "after"/"before" then menu items will be inserted after/before the existing entry with [menu entry key] if found. "after-spacer" and "before-spacer" do the same, but inserts before or after an item and a spacer. If not found, the bottom of list. If "top" the items are inserted in the top of the list.
Returns:
array Menu items array, processed.

Definition at line 1126 of file alt_clickmenu.php.

References t3lib_div::trimExplode().

clickMenu::cleanUpSpacers menuItems  ) 
 

Clean up spacers; Will remove any spacers in the start/end of menu items array plus any duplicates.

Parameters:
array Menu items array
Returns:
array Menu items array, processed.

Definition at line 1274 of file alt_clickmenu.php.

Referenced by printItems().

clickMenu::DB_changeFlag table,
rec,
flagField,
title,
name,
iconRelPath = 'gfx/'
 

Adding CM element for a flag field of the input record

Parameters:
string Table name
array Record array
string Name of the flag field
string Menu item Title
string Name of the item used for icons and labels
string Icon path relative to typo3/ folder
Returns:
array Item array, element in $menuItems

Definition at line 742 of file alt_clickmenu.php.

References $rec, excludeIcon(), frameLocation(), linkItem(), and t3lib_iconWorks::skinImg().

Referenced by DB_hideUnhide().

clickMenu::DB_copycut table,
uid,
type
 

Adding CM element for Clipboard "copy" and "cut"

Parameters:
string Table name
integer UID for the current record.
string Type: "copy" or "cut"
Returns:
array Item array, element in $menuItems

Definition at line 403 of file alt_clickmenu.php.

References excludeIcon(), label(), linkItem(), and t3lib_iconWorks::skinImg().

Referenced by printDBClickMenu().

clickMenu::DB_db_list table,
uid,
rec
 

Adding CM element for DBlist

Parameters:
string Table name
integer UID for the current record.
array Record of the element (needs "pid" field if not pages-record)
Returns:
array Item array, element in $menuItems

Definition at line 507 of file alt_clickmenu.php.

References $rec, excludeIcon(), t3lib_div::getIndpEnv(), linkItem(), and t3lib_iconWorks::skinImg().

clickMenu::DB_delete table,
uid,
elInfo
 

Adding CM element for Delete

Parameters:
string Table name
integer UID for the current record.
array Label for including in the confirmation message, EXT:lang/locallang_core.php:mess.delete
Returns:
array Item array, element in $menuItems

Definition at line 673 of file alt_clickmenu.php.

References excludeIcon(), label(), linkItem(), and t3lib_iconWorks::skinImg().

Referenced by printDBClickMenu().

clickMenu::DB_edit table,
uid
 

Adding CM element for regular editing of the element!

Parameters:
string Table name
integer UID for the current record.
Returns:
array Item array, element in $menuItems

Definition at line 606 of file alt_clickmenu.php.

References excludeIcon(), frameLocation(), t3lib_extMgm::isLoaded(), t3lib_BEfunc::isModuleSetInTBE_MODULES(), label(), linkItem(), and t3lib_iconWorks::skinImg().

Referenced by printDBClickMenu().

clickMenu::DB_editAccess table,
uid
 

Adding CM element for Editing of the access related fields of a table (disable, starttime, endtime, fe_groups)

Parameters:
string Table name
integer UID for the current record.
Returns:
array Item array, element in $menuItems

Definition at line 570 of file alt_clickmenu.php.

References excludeIcon(), linkItem(), and t3lib_iconWorks::skinImg().

clickMenu::DB_editPageHeader uid  ) 
 

Adding CM element for edit page header

Parameters:
integer page uid to edit (PID)
Returns:
array Item array, element in $menuItems

Definition at line 588 of file alt_clickmenu.php.

References excludeIcon(), linkItem(), and t3lib_iconWorks::skinImg().

clickMenu::DB_hideUnhide table,
rec,
hideField
 

Adding CM element for hide/unhide of the input record

Parameters:
string Table name
array Record array
string Name of the hide field
Returns:
array Item array, element in $menuItems

Definition at line 727 of file alt_clickmenu.php.

References $rec, DB_changeFlag(), and label().

clickMenu::DB_history table,
uid
 

Adding CM element for History

Parameters:
string Table name
integer UID for the current record.
Returns:
array Item array, element in $menuItems

Definition at line 469 of file alt_clickmenu.php.

References excludeIcon(), linkItem(), and t3lib_iconWorks::skinImg().

clickMenu::DB_info table,
uid
 

Adding CM element for Info

Parameters:
string Table name
integer UID for the current record.
Returns:
array Item array, element in $menuItems

Definition at line 453 of file alt_clickmenu.php.

References excludeIcon(), label(), linkItem(), and t3lib_iconWorks::skinImg().

Referenced by printDBClickMenu(), and printFileClickMenu().

clickMenu::DB_moveWizard table,
uid,
rec
 

Adding CM element for Moving wizard

Parameters:
string Table name
integer UID for the current record.
array Record. Needed for tt-content elements which will have the sys_language_uid sent
Returns:
array Item array, element in $menuItems

Definition at line 526 of file alt_clickmenu.php.

References $rec, excludeIcon(), linkItem(), t3lib_iconWorks::skinImg(), and urlRefForCM().

clickMenu::DB_new table,
uid
 

Adding CM element for regular Create new element

Parameters:
string Table name
integer UID for the current record.
Returns:
array Item array, element in $menuItems

Definition at line 648 of file alt_clickmenu.php.

References excludeIcon(), label(), linkItem(), and t3lib_iconWorks::skinImg().

Referenced by printDBClickMenu().

clickMenu::DB_newWizard table,
uid,
rec
 

Adding CM element for Create new wizard (either db_new.php or sysext/cms/layout/db_new_content_el.php or custom wizard)

Parameters:
string Table name
integer UID for the current record.
array Record.
Returns:
array Item array, element in $menuItems

Definition at line 547 of file alt_clickmenu.php.

References $rec, excludeIcon(), t3lib_extMgm::extRelPath(), t3lib_BEfunc::getModTSconfig(), t3lib_extMgm::isLoaded(), linkItem(), t3lib_iconWorks::skinImg(), and urlRefForCM().

clickMenu::DB_paste table,
uid,
type,
elInfo
 

Adding CM element for Clipboard "paste into"/"paste after" NOTICE: $table and $uid should follow the special syntax for paste, see clipboard-class :: pasteUrl();

Parameters:
string Table name
integer UID for the current record. NOTICE: Special syntax!
string Type: "into" or "after"
array Contains instructions about whether to copy or cut an element.
Returns:
array Item array, element in $menuItems
See also:
t3lib_clipboard::pasteUrl()

Definition at line 432 of file alt_clickmenu.php.

References excludeIcon(), frameLocation(), label(), linkItem(), and t3lib_iconWorks::skinImg().

Referenced by printDBClickMenu().

clickMenu::DB_perms table,
uid,
rec
 

Adding CM element for Permission setting

Parameters:
string Table name
integer UID for the current record.
array The "pages" record with "perms_*" fields inside.
Returns:
array Item array, element in $menuItems

Definition at line 488 of file alt_clickmenu.php.

References excludeIcon(), linkItem(), and t3lib_iconWorks::skinImg().

clickMenu::DB_tempMountPoint page_id  ) 
 

Adding element for setting temporary mount point.

Parameters:
integer Page uid (PID)
Returns:
array Item array, element in $menuItems

Definition at line 709 of file alt_clickmenu.php.

References excludeIcon(), label(), linkItem(), and t3lib_iconWorks::skinImg().

clickMenu::DB_view id,
anchor = ''
 

Adding CM element for View Page

Parameters:
integer Page uid (PID)
string Anchor, if any
Returns:
array Item array, element in $menuItems

Definition at line 694 of file alt_clickmenu.php.

References t3lib_BEfunc::BEgetRootLine(), excludeIcon(), label(), linkItem(), t3lib_iconWorks::skinImg(), and t3lib_BEfunc::viewOnClick().

Referenced by printDBClickMenu().

clickMenu::doDisplayTopFrameCM  ) 
 

Returns true if the menu should (also?) be displayed in topframe, not just

-layers

Returns:
boolean

Definition at line 203 of file alt_clickmenu.php.

Referenced by printItems(), and printLayerJScode().

clickMenu::enableDisableItems menuItems  ) 
 

Enabling / Disabling items based on list provided from GET var ($this->iParts[3])

Parameters:
array Menu items array
Returns:
array Menu items array, processed.

Definition at line 1236 of file alt_clickmenu.php.

References t3lib_div::inList(), and t3lib_div::trimExplode().

Referenced by printItems().

clickMenu::excludeIcon iconCode  ) 
 

Returns the input string IF not a user setting has disabled display of icons.

Parameters:
string The icon-image tag
Returns:
string The icon-image tag prefixed with space char IF the icon should be printed at all due to user settings

Definition at line 1226 of file alt_clickmenu.php.

Referenced by DB_changeFlag(), DB_copycut(), DB_db_list(), DB_delete(), DB_edit(), DB_editAccess(), DB_editPageHeader(), DB_history(), DB_info(), DB_moveWizard(), DB_new(), DB_newWizard(), DB_paste(), DB_perms(), DB_tempMountPoint(), DB_view(), FILE_copycut(), FILE_delete(), FILE_launch(), and FILE_paste().

clickMenu::externalProcessingOfDBMenuItems menuItems  ) 
 

Processing the $menuItems array (for extension classes) (DATABASE RECORDS)

Parameters:
array $menuItems array for manipulation.
Returns:
array Processed $menuItems array

Definition at line 355 of file alt_clickmenu.php.

Referenced by printDBClickMenu().

clickMenu::externalProcessingOfFileMenuItems menuItems  ) 
 

Processing the $menuItems array (for extension classes) (FILES)

Parameters:
array $menuItems array for manipulation.
Returns:
array Processed $menuItems array

Definition at line 840 of file alt_clickmenu.php.

Referenced by printFileClickMenu().

clickMenu::FILE_copycut path,
type
 

Returns element for copy or cut of files.

Parameters:
string Path to the file/directory (target)
string Type: "copy" or "cut"
Returns:
array Item array, element in $menuItems

Definition at line 874 of file alt_clickmenu.php.

References excludeIcon(), label(), linkItem(), and t3lib_iconWorks::skinImg().

Referenced by printFileClickMenu().

clickMenu::FILE_delete path  ) 
 

Creates element for deleting of target

Parameters:
string Path to the file/directory (target)
Returns:
array Item array, element in $menuItems

Definition at line 900 of file alt_clickmenu.php.

References excludeIcon(), frameLocation(), label(), linkItem(), and t3lib_iconWorks::skinImg().

Referenced by printFileClickMenu().

clickMenu::FILE_launch path,
script,
type,
image
 

Multi-function for adding an entry to the $menuItems array

Parameters:
string Path to the file/directory (target)
string Script (eg. file_edit.php) to pass &target= to
string "type" is the code which fetches the correct label for the element from "cm."
string icon image-filename from "gfx/" (12x12 icon)
Returns:
array Item array, element in $menuItems

Definition at line 854 of file alt_clickmenu.php.

References excludeIcon(), frameLocation(), label(), linkItem(), and t3lib_iconWorks::skinImg().

Referenced by printFileClickMenu().

clickMenu::FILE_paste path,
target,
elInfo
 

Creates element for pasting files.

Parameters:
string Path to the file/directory (target)
string target - NOT USED.
array Various values for the labels.
Returns:
array Item array, element in $menuItems

Definition at line 922 of file alt_clickmenu.php.

References excludeIcon(), label(), linkItem(), and t3lib_iconWorks::skinImg().

Referenced by printFileClickMenu().

clickMenu::frameLocation str  ) 
 

Appends ".location" to input string

Parameters:
string Input string, probably a JavaScript document reference
Returns:
string

Definition at line 1335 of file alt_clickmenu.php.

Referenced by DB_changeFlag(), DB_edit(), DB_paste(), FILE_delete(), and FILE_launch().

clickMenu::init item  ) 
 

Initialize click menu

Parameters:
string Input "item" GET var.
Returns:
string The clickmenu HTML content

Definition at line 160 of file alt_clickmenu.php.

References t3lib_div::_GP(), printDBClickMenu(), printFileClickMenu(), printNewDBLevel(), and t3lib_div::trimExplode().

clickMenu::isCMlayers  ) 
 

Returns true if there should be writing to the div-layers (commands sent to clipboard MUST NOT write to div-layers)

Returns:
boolean

Definition at line 1325 of file alt_clickmenu.php.

Referenced by printLayerJScode().

clickMenu::label label  ) 
 

Get label from locallang_core.php:cm.*

Parameters:
string The "cm."-suffix to get.
Returns:
string

Definition at line 1316 of file alt_clickmenu.php.

Referenced by DB_copycut(), DB_delete(), DB_edit(), DB_hideUnhide(), DB_info(), DB_new(), DB_paste(), DB_tempMountPoint(), DB_view(), FILE_copycut(), FILE_delete(), FILE_launch(), and FILE_paste().

clickMenu::linkItem str,
icon,
onClick,
onlyCM = 0,
dontHide = 0
 

Creating an array with various elements for the clickmenu entry

Parameters:
string The label, htmlspecialchar'ed already
string<img>-tag for the icon
string JavaScript onclick event for label/icon
boolean ==1 and the element will NOT appear in clickmenus in the topframe (unless clickmenu is totally unavailable)! ==2 and the item will NEVER appear in top frame. (This is mostly for "less important" options since the top frame is not capable of holding so many elements horizontally)
boolean If set, the clickmenu layer will not hide itself onclick - used for secondary menus to appear...
Returns:
array $menuItem entry with 6 numerical entries: [0] is the HTML for display of the element with link and icon an mouseover etc., [1]-[5] is simply the input params passed through!

Definition at line 1202 of file alt_clickmenu.php.

References t3lib_iconWorks::skinImg().

Referenced by DB_changeFlag(), DB_copycut(), DB_db_list(), DB_delete(), DB_edit(), DB_editAccess(), DB_editPageHeader(), DB_history(), DB_info(), DB_moveWizard(), DB_new(), DB_newWizard(), DB_paste(), DB_perms(), DB_tempMountPoint(), DB_view(), FILE_copycut(), FILE_delete(), FILE_launch(), and FILE_paste().

clickMenu::menuItemsForClickMenu menuItems  ) 
 

Traverses the menuItems and generates an output array for implosion in the CM div-layers table.

Parameters:
array $menuItem array
array Array with HTML content to be imploded between

-tags

Returns:
array array for implosion in the CM div-layers table.

Definition at line 1092 of file alt_clickmenu.php.

Referenced by printLayerJScode().

clickMenu::menuItemsForTopFrame menuItems  ) 
 

Traverses the menuItems and generates an output array for implosion in the topframe horizontal menu

Parameters:
array $menuItem array
array Array with HTML content to be imploded between

-tags

Returns:
array Array of menu items for top frame.

Definition at line 1075 of file alt_clickmenu.php.

clickMenu::printDBClickMenu table,
uid
 

Make 1st level clickmenu:

Parameters:
string Table name
integer UID for the current record.
Returns:
string HTML content

Definition at line 231 of file alt_clickmenu.php.

References DB_copycut(), DB_delete(), DB_edit(), DB_info(), DB_new(), DB_paste(), DB_view(), externalProcessingOfDBMenuItems(), t3lib_div::fixed_lgd_cs(), t3lib_iconWorks::getIconImage(), t3lib_BEfunc::getRecord(), t3lib_BEfunc::getRecordTitle(), printItems(), processingByExtClassArray(), and t3lib_iconWorks::skinImg().

Referenced by init().

clickMenu::printFileClickMenu path  ) 
 

Make 1st level clickmenu:

Parameters:
string The absolute path
Returns:
string HTML content

Definition at line 776 of file alt_clickmenu.php.

References DB_info(), externalProcessingOfFileMenuItems(), FILE_copycut(), FILE_delete(), FILE_launch(), FILE_paste(), t3lib_BEfunc::getFileIcon(), t3lib_div::inList(), t3lib_div::isAllowedAbsPath(), printItems(), and processingByExtClassArray().

Referenced by init().

clickMenu::printItems menuItems,
item
 

Prints the items from input $menuItems array - both as topframe menu AND the JS section for writing to the div-layers. Of course the topframe menu will appear only if $this->doDisplayTopFrameCM() returns true

Parameters:
array $menuItems array
string HTML code for the element which was clicked - shown in the end of the horizontal menu in topframe after the close-button.
Returns:
string HTML code

Definition at line 962 of file alt_clickmenu.php.

References cleanUpSpacers(), doDisplayTopFrameCM(), enableDisableItems(), printLayerJScode(), and t3lib_iconWorks::skinImg().

Referenced by printDBClickMenu(), printFileClickMenu(), and printNewDBLevel().

clickMenu::printLayerJScode menuItems  ) 
 

Create the JavaScript section

Parameters:
array The $menuItems array to print
Returns:
string The JavaScript section which will print the content of the CM to the div-layer in the target frame.

Definition at line 1014 of file alt_clickmenu.php.

References doDisplayTopFrameCM(), isCMlayers(), menuItemsForClickMenu(), and wrapColorTableCM().

Referenced by printItems().

clickMenu::printNewDBLevel table,
uid
 

Make 2nd level clickmenu (only for DBmenus)

Parameters:
string Table name
integer UID for the current record.
Returns:
string HTML content

Definition at line 318 of file alt_clickmenu.php.

References t3lib_iconWorks::getIconImage(), t3lib_BEfunc::getRecord(), printItems(), processingByExtClassArray(), and t3lib_iconWorks::skinImg().

Referenced by init().

clickMenu::processingByExtClassArray menuItems,
table,
uid
 

Processing the $menuItems array by external classes (typ. adding items)

Parameters:
array $menuItems array for manipulation.
string Table name
integer UID for the current record.
Returns:
array Processed $menuItems array

Definition at line 367 of file alt_clickmenu.php.

References t3lib_div::makeInstance().

Referenced by printDBClickMenu(), printFileClickMenu(), and printNewDBLevel().

clickMenu::urlRefForCM url,
retUrl = '',
hideCM = 1
 

Returning JavaScript for the onClick event linking to the input URL.

Parameters:
string The URL relative to TYPO3_mainDir
string The return_url-parameter
boolean If set, the "hideCM()" will be called
Returns:
string JavaScript for an onClick event.

Definition at line 386 of file alt_clickmenu.php.

Referenced by DB_moveWizard(), and DB_newWizard().

clickMenu::wrapColorTableCM str  ) 
 

Wrapping the input string in a table with background color 4 and a black border style. For the pop-up menu

Parameters:
string HTML content to wrap in table.
Returns:
string

Definition at line 1052 of file alt_clickmenu.php.

Referenced by printLayerJScode().


The documentation for this class was generated from the following file:


Généré par Les spécialistes TYPO3 avec  doxygen 1.4.6