class SharedDocumentsController extends AbstractDocumentController (View source)

Class for SharedDocumentsController

Properties

bool $accessNeedLoggedUser

if this controller need logged user or not

from  Controller
int $accessRight

Inherited from Controller

from  AbstractDocumentController
bool $controllerStatus

If controller is active

from  Controller
DoliDB $db

Inherited from Controller

from  AbstractDocumentController
string $tplPath from  Controller
FormListWebPortal $formList from  Controller
string $sanitized_subdir

Methods

void
__construct()

Constructor

int
action()

Action method is called before html output.

bool
checkAccess()

Check access rights for this page.

void
display()

Build and display the page.

void
display404()

Display error template

int
hookDoAction(array<string, mixed> $parameters = array())

Execute hook doActions

int
hookPrintPageView(array<string, mixed> $parameters = array())

Execute hook PrintPageView

bool
loadTemplate(string $templateName, mixed $vars = false)

Load a template .tpl file

void
displayDocumentTable(string $title, array<int, array<string, mixed>> $itemList, string $emptyMessage, array $linkBuilder)

Renders an HTML file browser table for a given list of files and directories.

Details

void __construct()

Constructor

Return Value

void

int action()

Action method is called before html output.

Return Value

int

Return integer < 0 on error, > 0 on success

bool checkAccess()

Check access rights for this page.

Return Value

bool

void display()

Build and display the page.

Return Value

void

void display404()

Display error template

Return Value

void

int hookDoAction(array<string, mixed> $parameters = array())

Execute hook doActions

Parameters

array<string, mixed> $parameters Parameters

Return Value

int

Return integer < 0 on error, 0 on success, 1 to replace standard code

int hookPrintPageView(array<string, mixed> $parameters = array())

Execute hook PrintPageView

Parameters

array<string, mixed> $parameters Parameters

Return Value

int

Return integer < 0 on error, 0 on success, 1 to replace standard code

bool loadTemplate(string $templateName, mixed $vars = false)

Load a template .tpl file

Parameters

string $templateName

Template file name (without the .tpl.php)

mixed $vars

Data to transmit to template

Return Value

bool

True if template found, else false

protected void displayDocumentTable(string $title, array<int, array<string, mixed>> $itemList, string $emptyMessage, array $linkBuilder)

Renders an HTML file browser table for a given list of files and directories.

Parameters

string $title

The main H2 title for the page.

array<int, array<string, mixed>> $itemList

The list of items from dol_dir_list('all').

string $emptyMessage

The message to display if the list is empty.

array $linkBuilder

An array of functions to build URLs ('dir' and 'file').

Return Value

void