dolibarr  7.0.0-beta
Functions
project.lib.php File Reference

Functions used by project module. More...

Go to the source code of this file.

Functions

 project_prepare_head ($object)
 Prepare array with list of tabs. More...
 
 task_prepare_head ($object)
 Prepare array with list of tabs. More...
 
 project_timesheet_prepare_head ($mode, $fuser=null)
 Prepare array with list of tabs. More...
 
 project_admin_prepare_head ()
 Prepare array with list of tabs. More...
 
 projectLinesa (&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId='', $addordertick=0, $projectidfortotallink=0)
 Show task lines with a particular parent. More...
 
 projectLinesPerAction (&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak=0)
 Output a task line into a pertime intput mode. More...
 
 projectLinesPerDay (&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, $preselectedday, &$isavailable, $oldprojectforbreak=0)
 Output a task line into a pertime intput mode. More...
 
 projectLinesPerWeek (&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak=0)
 Output a task line into a perday intput mode. More...
 
 searchTaskInChild (&$inc, $parent, &$lines, &$taskrole)
 Search in task lines with a particular parent if there is a task for a particular user (in taskrole) More...
 
 print_projecttasks_array ($db, $form, $socid, $projectsListId, $mytasks=0, $statut=-1, $listofoppstatus=array(), $hiddenfields=array())
 Return HTML table with list of projects and number of opened tasks. More...
 

Detailed Description

Functions used by project module.

Definition in file project.lib.php.

Function Documentation

print_projecttasks_array (   $db,
  $form,
  $socid,
  $projectsListId,
  $mytasks = 0,
  $statut = -1,
  $listofoppstatus = array(),
  $hiddenfields = array() 
)

Return HTML table with list of projects and number of opened tasks.

Parameters
DoliDB$dbDatabase handler
Form$formObject form
int$socidId thirdparty
int$projectsListIdId of project I have permission on
int$mytasksLimited to task I am contact to
int$statut-1=No filter on statut, 0 or 1 = Filter on status
array$listofoppstatusList of opportunity status
array$hiddenfieldsList of info to not show ('projectlabel', 'declaredprogress', '...', )
Returns
void

Definition at line 1392 of file project.lib.php.

References $title, convertSecondToTime(), dol_getIdFromCode(), price(), price2num(), print, and print_liste_field_titre().

project_admin_prepare_head ( )

Prepare array with list of tabs.

Returns
array Array of tabs to show

Definition at line 286 of file project.lib.php.

References complete_head_from_modules().

project_prepare_head (   $object)

Prepare array with list of tabs.

Parameters
Object$objectObject related to tabs
Returns
array Array of tabs to show

Definition at line 35 of file project.lib.php.

References complete_head_from_modules(), Link\count(), dol_dir_list(), and dol_sanitizeFileName().

project_timesheet_prepare_head (   $mode,
  $fuser = null 
)

Prepare array with list of tabs.

Parameters
string$modeMode
string$fuserFilter on user
Returns
array Array of tabs to show

Definition at line 237 of file project.lib.php.

References complete_head_from_modules(), and if.

projectLinesa ( $inc,
  $parent,
$lines,
$level,
  $var,
  $showproject,
$taskrole,
  $projectsListId = '',
  $addordertick = 0,
  $projectidfortotallink = 0 
)

Show task lines with a particular parent.

Parameters
string$incLine number (start to 0, then increased by recursive call)
string$parentId of parent project to show (0 to show all)
Task[]$lines Array of lines
int$levelLevel (start to 0, then increased/decrease by recursive call), or -1 to show all level in order of $lines without the recursive groupment feature.
string$varColor
int$showprojectShow project columns
int$taskroleArray of roles of user for each tasks
int$projectsListIdList of id of project allowed to user (string separated with comma)
int$addordertickAdd a tick to move task
int$projectidfortotallink0 or Id of project to use on total line (link to see all time consumed for project)
Returns
void

Definition at line 332 of file project.lib.php.

References convertSecondToTime(), dol_print_date(), if, img_warning(), print, and searchTaskInChild().

projectLinesPerAction ( $inc,
  $parent,
  $fuser,
  $lines,
$level,
$projectsrole,
$tasksrole,
  $mine,
  $restricteditformytask,
  $preselectedday,
$isavailable,
  $oldprojectforbreak = 0 
)

Output a task line into a pertime intput mode.

Parameters
string$incLine number (start to 0, then increased by recursive call)
string$parentId of parent task to show (0 to show all)
User | null$fuserRestrict list to user if defined
Task[]$lines Array of lines
int$levelLevel (start to 0, then increased/decrease by recursive call)
string$projectsroleArray of roles user has on project
string$tasksroleArray of roles user has on task
string$mineShow only task lines I am assigned to
int$restricteditformytask0=No restriction, 1=Enable add time only if task is a task i am affected to
int$preselecteddayPreselected day
array$isavailableArray with data that say if user is available for several days for morning and afternoon
int$oldprojectforbreakOld project id of last project break
Returns
array Array with time spent for $fuser for each day of week on tasks in $lines and substasks

Definition at line 595 of file project.lib.php.

References $form, convertSecondToTime(), dol_print_date(), and print.

projectLinesPerDay ( $inc,
  $parent,
  $fuser,
  $lines,
$level,
$projectsrole,
$tasksrole,
  $mine,
  $restricteditformytask,
  $preselectedday,
$isavailable,
  $oldprojectforbreak = 0 
)

Output a task line into a pertime intput mode.

Parameters
string$incLine number (start to 0, then increased by recursive call)
string$parentId of parent task to show (0 to show all)
User | null$fuserRestrict list to user if defined
Task[]$lines Array of lines
int$levelLevel (start to 0, then increased/decrease by recursive call)
string$projectsroleArray of roles user has on project
string$tasksroleArray of roles user has on task
string$mineShow only task lines I am assigned to
int$restricteditformytask0=No restriction, 1=Enable add time only if task is a task i am affected to
int$preselecteddayPreselected day
array$isavailableArray with data that say if user is available for several days for morning and afternoon
int$oldprojectforbreakOld project id of last project break
Returns
array Array with time spent for $fuser for each day of week on tasks in $lines and substasks

Definition at line 821 of file project.lib.php.

References $form, convertSecondToTime(), and print.

projectLinesPerWeek ( $inc,
  $firstdaytoshow,
  $fuser,
  $parent,
  $lines,
$level,
$projectsrole,
$tasksrole,
  $mine,
  $restricteditformytask,
$isavailable,
  $oldprojectforbreak = 0 
)

Output a task line into a perday intput mode.

Parameters
string$incLine output identificator (start to 0, then increased by recursive call)
int$firstdaytoshowFirst day to show
User | null$fuserRestrict list to user if defined
string$parentId of parent task to show (0 to show all)
Task[]$lines Array of lines (list of tasks but we will show only if we have a specific role on task)
int$levelLevel (start to 0, then increased/decrease by recursive call)
string$projectsroleArray of roles user has on project
string$tasksroleArray of roles user has on task
string$mineShow only task lines I am assigned to
int$restricteditformytask0=No restriction, 1=Enable add time only if task is a task i am affected to
array$isavailableArray with data that say if user is available for several days for morning and afternoon
int$oldprojectforbreakOld project id of last project break
Returns
array Array with time spent for $fuser for each day of week on tasks in $lines and substasks

Definition at line 1094 of file project.lib.php.

References $form, convertSecondToTime(), dol_getdate(), dol_time_plus_duree(), and print.

searchTaskInChild ( $inc,
  $parent,
$lines,
$taskrole 
)

Search in task lines with a particular parent if there is a task for a particular user (in taskrole)

Parameters
string$incCounter that count number of lines legitimate to show (for return)
int$parentId of parent task to start
array$linesArray of all tasks
string$taskroleArray of task filtered on a particular user
Returns
int 1 if there is

Definition at line 1352 of file project.lib.php.

Referenced by projectLinesa().

task_prepare_head (   $object)

Prepare array with list of tabs.

Parameters
Object$objectObject related to tabs
Returns
array Array of tabs to show

Definition at line 147 of file project.lib.php.

References $resql, complete_head_from_modules(), Link\count(), dol_dir_list(), dol_print_error(), and dol_sanitizeFileName().