FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Reuser\ReuserPlugin Class Reference

UI plugin for reuser. More...

Inheritance diagram for Fossology\Reuser\ReuserPlugin:
Inheritance graph
Collaboration diagram for Fossology\Reuser\ReuserPlugin:
Collaboration graph

Public Member Functions

 getAllUploads ()
 Get all uploads accessible to curent user. More...
 
 getFolderIdAndTrustGroup ($folderGroup)
 For a given folder group, extract forder id and trust group id. More...
 
 renderContent (&$vars)
 Load the data in array and render twig template. More...
 
 renderFoot (&$vars)
 Render footer template. More...
 
- Public Member Functions inherited from Fossology\Lib\Plugin\DefaultPlugin
 __construct ($name, $parameters=array())
 
 getName ()
 
 getVersion ()
 
 getTitle ()
 
 isRequiresLogin ()
 
 getDependency ()
 
 getPluginLevel ()
 
 getDBaccess ()
 
 getState ()
 
 getInitOrder ()
 
 getNoMenu ()
 
 getResponse ()
 
 getObject ($name)
 
 preInstall ()
 
 postInstall ()
 
 unInstall ()
 
 execute ()
 
 isLoggedIn ()
 
 __get ($name)
 
 __toString ()
 

Public Attributes

const NAME = "plugin_reuser"
 UI mod name.
 
const REUSE_FOLDER_SELECTOR_NAME = 'reuseFolderSelectorName'
 Reuse upload folder element name.
 
const UPLOAD_TO_REUSE_SELECTOR_NAME = 'uploadToReuse'
 Upload to reuse HTML element name.
 
const FOLDER_PARAMETER_NAME = 'folder'
 Folder parameter HTML element name.
 
 $AgentName = 'agent_reuser'
 
- Public Attributes inherited from Fossology\Lib\Plugin\DefaultPlugin
const PERMISSION = "permission"
 
const REQUIRES_LOGIN = "requiresLogin"
 
const ENABLE_MENU = "ENABLE_MENU"
 
const LEVEL = "level"
 
const DEPENDENCIES = "dependencies"
 
const INIT_ORDER = "initOrder"
 
const MENU_LIST = "menuList"
 
const MENU_ORDER = "menuOrder"
 
const MENU_TARGET = "menuTarget"
 
const TITLE = "title"
 

Protected Member Functions

 handle (Request $request)
 
 prepareFolderUploads ($folderId, $trustGroupId=null)
 For a given folder id, collect all uploads. More...
 
- Protected Member Functions inherited from Fossology\Lib\Plugin\DefaultPlugin
 RegisterMenus ()
 Customize submenus.
 
 render ($templateName, $vars=null, $headers=null)
 
 getDefaultHeaders ()
 
 getDefaultVars ()
 
 mergeWithDefault ($vars)
 
 flushContent ($content)
 

Private Attributes

 $folderDao
 

Additional Inherited Members

- Protected Attributes inherited from Fossology\Lib\Plugin\DefaultPlugin
 $container
 
 $renderer
 
 $microMenu
 

Detailed Description

UI plugin for reuser.

Definition at line 25 of file reuser-plugin.php.

Member Function Documentation

◆ getAllUploads()

Fossology\Reuser\ReuserPlugin::getAllUploads ( )

Get all uploads accessible to curent user.

Gets all folders accessible by current user and iterate them. Find every upload with in that folder and add data from prepareFolderUploads().

Returns
array Key as upload id

Definition at line 59 of file reuser-plugin.php.

◆ getFolderIdAndTrustGroup()

Fossology\Reuser\ReuserPlugin::getFolderIdAndTrustGroup (   $folderGroup)

For a given folder group, extract forder id and trust group id.

Parameters
array$folderGroup
Returns
int[]

Definition at line 100 of file reuser-plugin.php.

◆ handle()

Fossology\Reuser\ReuserPlugin::handle ( Request  $request)
protected

Parameters
Request$request
Returns
Response
See also
Fossology::Lib::Plugin::DefaultPlugin::handle()

Reimplemented from Fossology\Lib\Plugin\DefaultPlugin.

Definition at line 76 of file reuser-plugin.php.

◆ prepareFolderUploads()

Fossology\Reuser\ReuserPlugin::prepareFolderUploads (   $folderId,
  $trustGroupId = null 
)
protected

For a given folder id, collect all uploads.

Creates an array of uploads with <upload_id,group_id> as the key and <upload_name> from <Y-m-d H:i> (<status>) as value.

Parameters
int$folderId
int$trustGroupId
Returns
UploadProgress[]

Definition at line 167 of file reuser-plugin.php.

◆ renderContent()

Fossology\Reuser\ReuserPlugin::renderContent ( $vars)

Load the data in array and render twig template.

Parameters
[in,out]array$vars
Returns
string

Definition at line 119 of file reuser-plugin.php.

◆ renderFoot()

Fossology\Reuser\ReuserPlugin::renderFoot ( $vars)

Render footer template.

Parameters
array$vars
Returns
string

Definition at line 149 of file reuser-plugin.php.

Member Data Documentation

◆ $AgentName

string Fossology\Reuser\ReuserPlugin::$AgentName = 'agent_reuser'

Agent name from DB

Definition at line 36 of file reuser-plugin.php.

◆ $folderDao

FolderDao Fossology\Reuser\ReuserPlugin::$folderDao
private

Folder Dao object

Definition at line 40 of file reuser-plugin.php.


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