FOSSology  4.4.0
Open Source License Compliance by Open Source Software
ui_picker Class Reference
Inheritance diagram for ui_picker:
Inheritance graph
Collaboration diagram for ui_picker:
Collaboration graph

Public Member Functions

 __construct ()
 base constructor. Most plugins will just use this More...
 
 Install ()
 Create and configure database tables.
 
 RegisterMenus ()
 Customize submenus.
 
 Initialize ()
 This is called before the plugin is used. More...
 
 Create_file_picker ()
 Create file_picker table.
 
 HTMLFileList ($File1uploadtree_pk, $Children, $FolderContents)
 Given an $File1uploadtree_pk, $Children are non artifact children of $File1uploadtree_pk. More...
 
 HTMLPath ($File1uploadtree_pk, $FolderList, $DirectoryList)
 
 HistoryPick ($uploadtree_pk, &$rtncount)
 pick history More...
 
 SuggestionsPick ($FileName, $uploadtree_pk, &$rtncount)
 Search the whole repository for containers with names similar to $FileName (based on the beggining text of $FileName) More...
 
 BrowsePick ($uploadtree_pk, $inBrowseuploadtree_pk, $infolder_pk, $PathArray)
 file browser More...
 
 GetFolderContents ($folder_pk)
 
 HTMLout ($RtnMod, $uploadtree_pk, $Browseuploadtree_pk, $folder_pk, $PathArray)
 the html format out info More...
 
 Output ()
 The Picker page. More...
 
- Public Member Functions inherited from FO_Plugin
 Remove ()
 This function (when defined) is only called once, when the plugin is removed. It should uninstall and remove all items that are only used by this plugin. There should be no residues – if the plugin is ever installed again, it should act like a clean install. Thus, any DB, files, or state variables specific to this plugin must be removed. This function must always succeed.
 
 PostInitialize ()
 This function is called before the plugin is used and after all plugins have been initialized. If there is any initialization step that is dependent on other plugins, put it here. More...
 
 Destroy ()
 This is a destructor called after the plugin is no longer needed. It should assume that PostInitialize() was already run one time (this session) and succeeded. This function must always succeed.
 
 OutputOpen ()
 This function is called when user output is requested. This function is responsible for assigning headers.
 
 OutputUnSet ()
 Similar to OutputClose, this ends the output type for this object. However, this does NOT change any global settings. This is called when this object is a dependency for another object.
 
 getResponse ()
 
 getTemplateName ()
 
 renderString ($templateName, $vars=null)
 
 renderScripts ($scripts)
 Render JavaScript in the template's footer. More...
 
 getRequest ()
 
 execute ()
 
 preInstall ()
 
 postInstall ()
 
 unInstall ()
 
 getName ()
 
 __toString ()
 

Public Attributes

 $HighlightColor = '#4bfe78'
 
- Public Attributes inherited from FO_Plugin
 $State = PLUGIN_STATE_INVALID
 
 $Name = ""
 
 $Version = "1.0"
 
 $Title = ""
 
 $DBaccess = PLUGIN_DB_NONE
 
 $LoginFlag = 0
 
 $NoMenu = 0
 
 $NoHeader = 0
 
 $PluginLevel = 10
 
 $Dependency = array()
 
 $InitOrder = 0
 
 $MenuList = NULL
 
 $MenuOrder = 0
 
 $MenuTarget = NULL
 
 $OutputType = "HTML"
 
 $OutputToStdout = 0
 

Protected Member Functions

 ApplicationPick ($SLName, $SelectedVal, $label)
 Generate html to pick the application that will be called after the items are identified. More...
 
- Protected Member Functions inherited from FO_Plugin
 render ($templateName, $vars=null)
 

Private Member Functions

 Uploadtree2PathStr ($PathArray)
 Get string representation of uploadtree path. Use Dir2Path to get $PathArray. More...
 

Private Attributes

 $uploadDao
 

Additional Inherited Members

- Protected Attributes inherited from FO_Plugin
 $microMenu
 
 $renderer
 
 $vars = array()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ui_picker::__construct ( )

base constructor. Most plugins will just use this

Makes sure the plugin is in the correct state. If so, the plugin is inserted into the Plugins data structure.

The constructor assumes that Install() was already run one time (possibly years ago and not during this object's creation).

Returns
true on success, false on failure.

On failure the plugin is not used by the system. NOTE: This function must NOT assume that other plugins are installed. See PostInitialize.

Reimplemented from FO_Plugin.

Examples
/home/runner/work/fossology/fossology/src/www/ui/ui-picker.php.

Definition at line 42 of file ui-picker.php.

Member Function Documentation

◆ ApplicationPick()

ui_picker::ApplicationPick (   $SLName,
  $SelectedVal,
  $label 
)
protected

Generate html to pick the application that will be called after the items are identified.

Select list element ID is "apick"

Parameters
$SLName- select list name
$SelectedVal- selected value
$label- label of select list
Returns
string containing html to pick the application that will be called after the items are identified
Examples
/home/runner/work/fossology/fossology/src/www/ui/ui-picker.php.

Definition at line 728 of file ui-picker.php.

◆ BrowsePick()

ui_picker::BrowsePick (   $uploadtree_pk,
  $inBrowseuploadtree_pk,
  $infolder_pk,
  $PathArray 
)

file browser

Returns
the HTML for the File browser.
Examples
/home/runner/work/fossology/fossology/src/www/ui/ui-picker.php.

Definition at line 421 of file ui-picker.php.

◆ HistoryPick()

ui_picker::HistoryPick (   $uploadtree_pk,
$rtncount 
)

pick history

Parameters
$uploadtree_pk- for File 1 (aka item1)

return html for the history pick, may be empty array if no history.

Examples
/home/runner/work/fossology/fossology/src/www/ui/ui-picker.php.

Definition at line 316 of file ui-picker.php.

◆ HTMLFileList()

ui_picker::HTMLFileList (   $File1uploadtree_pk,
  $Children,
  $FolderContents 
)

Given an $File1uploadtree_pk, $Children are non artifact children of $File1uploadtree_pk.

Returns
a string with the html table, file listing (the browse tree), for these children.
Examples
/home/runner/work/fossology/fossology/src/www/ui/ui-picker.php.

Definition at line 146 of file ui-picker.php.

◆ HTMLout()

ui_picker::HTMLout (   $RtnMod,
  $uploadtree_pk,
  $Browseuploadtree_pk,
  $folder_pk,
  $PathArray 
)

the html format out info

Parameters
$RtnMod- module to run after a file is picked
$uploadtree_pk- of file1
$Browseuploadtree_pk- uploadtree_pk selected in file browser (may be empty)
$folder_pk- folder_pk selected in file browser (may be empty)
$PathArray- path to uploadtree_pk (array of uploadtree recs)

Script to run when item2 is selected Compare app is id=apick arg: "rtnmod" is the compare app arg: "item" is uploadtree_pk arg: "item2" is val

Suggestions. Suggestions are restricted to the same file type (rpm, bz2, etc) to keep the user from being overwhelmed with choices. So if they want to compare a .bz2 with a .gz, they will have to use the Browse Window.

Examples
/home/runner/work/fossology/fossology/src/www/ui/ui-picker.php.

Definition at line 551 of file ui-picker.php.

◆ Initialize()

ui_picker::Initialize ( )

This is called before the plugin is used.

Returns
true on success, false on failure. A failed initialize is not used by the system.
Note
This function must NOT assume that other plugins are installed.

Reimplemented from FO_Plugin.

Examples
/home/runner/work/fossology/fossology/src/www/ui/ui-picker.php.

Definition at line 90 of file ui-picker.php.

◆ Output()

ui_picker::Output ( )

The Picker page.

create table if it doesn't exist (not assuming Install() was run. eg. source update

After picking an item2, this logic will record the pick in the picker history, and then redirect both item1 and item2 to the comparison app.

Reimplemented from FO_Plugin.

Examples
/home/runner/work/fossology/fossology/src/www/ui/ui-picker.php.

Definition at line 624 of file ui-picker.php.

◆ SuggestionsPick()

ui_picker::SuggestionsPick (   $FileName,
  $uploadtree_pk,
$rtncount 
)

Search the whole repository for containers with names similar to $FileName (based on the beggining text of $FileName)

Parameters
$uploadtree_pk- the pk of $FileName.
Returns
html (select list) for picking suggestions.
Examples
/home/runner/work/fossology/fossology/src/www/ui/ui-picker.php.

Definition at line 369 of file ui-picker.php.

◆ Uploadtree2PathStr()

ui_picker::Uploadtree2PathStr (   $PathArray)
private

Get string representation of uploadtree path. Use Dir2Path to get $PathArray.

Parameters
$PathArryan array containing the path
Returns
string representation of uploadtree path
Examples
/home/runner/work/fossology/fossology/src/www/ui/ui-picker.php.

Definition at line 704 of file ui-picker.php.


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