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

Public Member Functions

 __construct ()
 base constructor. Most plugins will just use this More...
 
 Install ()
 Create and configure database tables. More...
 
 Initialize ()
 This is called before the plugin is used. More...
 
 GetTreeInfo ($Uploadtree_pk)
 Get uploadtree info for a given uploadtree_pk. More...
 
 UploadHist ($Uploadtree_pk, $TreeInfo, $BucketDefArray)
 Given an $Uploadtree_pk, return a string with the histogram for the directory BY bucket. More...
 
 ChildElt ($Child, $agent_pk, $OtherChild, $BucketDefArray)
 Return the entire <td> ... </td> for $Child file listing table differences are highlighted. More...
 
 ItemComparisonRows ($Master, $agent_pk1, $agent_pk2, $BucketDefArray)
 Get a string with the html table rows comparing the two file lists. More...
 
 AddBucketStr ($TreeInfo, &$Children, $BucketDefArray)
 Add bucket_pk array and string to Children array. More...
 
 EvalThreshold ($MyArray, $Threshold, $BucketDefArray)
 Check all the buckets in $MyArray. More...
 
 filter_samebucketlist (&$Master)
 remove files that contain identical bucket lists More...
 
 FilterChildren ($filter, &$Master, $BucketDefArray)
 Filter children. More...
 
 HTMLout ($Master, $uploadtree_pk1, $uploadtree_pk2, $in_uploadtree_pk1, $in_uploadtree_pk2, $filter, $TreeInfo1, $TreeInfo2, $BucketDefArray)
 HTML output. More...
 
 Output ()
 This function is called when user output is requested. This function is responsible for content. (OutputOpen and Output are separated so one plugin can call another plugin's Output.) More...
 
 htmlContent ()
 
- 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...
 
 RegisterMenus ()
 While menus can be added to any time at or after the PostInitialize phase, this is the standard location for registering this item with menus. 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

 $ColumnSeparatorStyleL = "style='border:solid 0 #006600; border-left-width:2px;padding-left:1em'"
 
 $threshold = 150
 
- 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
 

Additional Inherited Members

- Protected Member Functions inherited from FO_Plugin
 render ($templateName, $vars=null)
 
- Protected Attributes inherited from FO_Plugin
 $microMenu
 
 $renderer
 
 $vars = array()
 

Detailed Description

UI plugin for buckets diff

Definition at line 16 of file bucket-diff.php.

Constructor & Destructor Documentation

◆ __construct()

ui_diff_buckets::__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.

Definition at line 21 of file bucket-diff.php.

Member Function Documentation

◆ AddBucketStr()

ui_diff_buckets::AddBucketStr (   $TreeInfo,
$Children,
  $BucketDefArray 
)

Add bucket_pk array and string to Children array.

Parameters
array$TreeInfo
array$Children
array$BucketDefArray
Returns
array updated $Children

Definition at line 358 of file bucket-diff.php.

◆ ChildElt()

ui_diff_buckets::ChildElt (   $Child,
  $agent_pk,
  $OtherChild,
  $BucketDefArray 
)

Return the entire <td> ... </td> for $Child file listing table differences are highlighted.

Parameters
array$Child
int$agent_pk
array$OtherChild
array$BucketDefArray
Returns
string the entire html <td> ... </td> for $Child file listing table differences are highlighted.

Definition at line 246 of file bucket-diff.php.

◆ EvalThreshold()

ui_diff_buckets::EvalThreshold (   $MyArray,
  $Threshold,
  $BucketDefArray 
)

Check all the buckets in $MyArray.

Parameters
array$MyArrayArray of bucket_pk's
int$Threshold
array$BucketDefArray
Returns
boolean True if all the bucket_evalorder's are at or below $Threshold else return False if any are above $Threshold

Definition at line 379 of file bucket-diff.php.

◆ filter_samebucketlist()

ui_diff_buckets::filter_samebucketlist ( $Master)

remove files that contain identical bucket lists

Parameters
array&$Master

Definition at line 425 of file bucket-diff.php.

◆ FilterChildren()

ui_diff_buckets::FilterChildren (   $filter,
$Master,
  $BucketDefArray 
)

Filter children.

Parameters
string$filternone, samebucketlist (An empty or unknown filter is the same as "none")
array&$Master
array$BucketDefArray

Definition at line 446 of file bucket-diff.php.

◆ GetTreeInfo()

ui_diff_buckets::GetTreeInfo (   $Uploadtree_pk)

Get uploadtree info for a given uploadtree_pk.

Parameters
int$Uploadtree_pk
Returns
array with uploadtree record and:
agent_pk
bucketagent_pk
nomosagent_pk
bucketpool_pk

Definition at line 78 of file bucket-diff.php.

◆ htmlContent()

ui_diff_buckets::htmlContent ( )

Create HTML output

Returns
string HTML output

Definition at line 688 of file bucket-diff.php.

◆ HTMLout()

ui_diff_buckets::HTMLout (   $Master,
  $uploadtree_pk1,
  $uploadtree_pk2,
  $in_uploadtree_pk1,
  $in_uploadtree_pk2,
  $filter,
  $TreeInfo1,
  $TreeInfo2,
  $BucketDefArray 
)

HTML output.

Parameters
array$Master
int$uploadtree_pk1
int$uploadtree_pk2
int$in_uploadtree_pk1
int$in_uploadtree_pk2
string$filter
array$TreeInfo1
array$TreeInfo2
array$BucketDefArray
Returns
string HTML as string.

Definition at line 473 of file bucket-diff.php.

◆ Initialize()

ui_diff_buckets::Initialize ( )

This is called before the plugin is used.

It should assume that Install() was already run one time (possibly years ago and not during this object's creation).

Returns
boolean 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.
See also
FO_Plugin::Initialize()

Reimplemented from FO_Plugin.

Definition at line 54 of file bucket-diff.php.

◆ Install()

ui_diff_buckets::Install ( )

Create and configure database tables.

See also
FO_Plugin::Install()

Reimplemented from FO_Plugin.

Definition at line 35 of file bucket-diff.php.

◆ ItemComparisonRows()

ui_diff_buckets::ItemComparisonRows (   $Master,
  $agent_pk1,
  $agent_pk2,
  $BucketDefArray 
)

Get a string with the html table rows comparing the two file lists.

Each row contains 5 table fields. The third field is just for a column separator. If files match their fuzzyname then put on the same row. Highlight license differences. Unmatched fuzzynames go on a row of their own.

Parameters
array$Master
int$agent_pk1
int$agent_pk2
array$BucketDefArray
Returns
string html table

Definition at line 311 of file bucket-diff.php.

◆ Output()

ui_diff_buckets::Output ( )

This function is called when user output is requested. This function is responsible for content. (OutputOpen and Output are separated so one plugin can call another plugin's Output.)

Requires:
filter: optional filter to apply
item1: uploadtree_pk of the column 1 tree
item2: uploadtree_pk of the column 2 tree
freeze: column number (1 or 2) to freeze

See also
FO_Plugin::Output()

Reimplemented from FO_Plugin.

Definition at line 634 of file bucket-diff.php.

◆ UploadHist()

ui_diff_buckets::UploadHist (   $Uploadtree_pk,
  $TreeInfo,
  $BucketDefArray 
)

Given an $Uploadtree_pk, return a string with the histogram for the directory BY bucket.

Parameters
int$Uploadtree_pk
array$TreeInfo
array$BucketDefArray
Returns
string a string with the histogram for the directory BY bucket.

Definition at line 116 of file bucket-diff.php.

Member Data Documentation

◆ $threshold

ui_diff_buckets::$threshold = 150

cut point for removing by eval order, hardcode for v1

Definition at line 19 of file bucket-diff.php.


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