TGantt
extends TElement
in package
TGantt
Tags
Table of Contents
Constants
- ADJUST_MARGIN = ['xs' => 0, 'sm' => 2, 'md' => 4, 'lg' => 10]
- COLUMNHOURVAL = 24
- HOURS = ['00', '01', '12', '18']
- HOURS_24 = ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23']
- MODE_DAYS = 'MODE_DAYS'
- MODE_DAYS_WITH_HOUR = 'MODE_DAYS_WITH_HOUR'
- MODE_MONTHS = 'MODE_MONTHS'
- MODE_MONTHS_WITH_DAY = 'MODE_MONTHS_WITH_DAY'
- SIZES = ['xs', 'sm', 'md', 'lg']
- SIZESPX = [30, 60, 120, 240]
- SIZESPXHORAS = [120, 240, 480, 960]
Properties
- $count_hours : mixed
- $dates : mixed
- $dayClickAction : mixed
- $dragEvent : mixed
- $end_date : mixed
- $eventAction : mixed
- $events : mixed
- $headerActions : mixed
- $hours : mixed
- $interval : mixed
- $minutesStep : mixed
- $reloadAction : mixed
- $remove_space : mixed
- $rows : mixed
- $size : mixed
- $size_mode_button : mixed
- $size_mode_options : mixed
- $start_date : mixed
- $stripedMonths : mixed
- $stripedRows : mixed
- $title : mixed
- $transformEventLabel : mixed
- $transformTimeTitle : mixed
- $updateAction : mixed
- $view_mode : mixed
- $view_mode_button : mixed
- $view_mode_options : mixed
Methods
- __construct() : mixed
- Constructor method
- addEvent() : mixed
- Add new event on Gantt
- addHeaderAction() : mixed
- Define reload events action
- addHeaderWidget() : mixed
- Add a form header widget
- addRow() : mixed
- Add new row
- clearEvents() : mixed
- enableDragEvent() : mixed
- Define drag event action
- enableFullHours() : mixed
- Enable hour when MODE_DAYS_WITH_HOUR 24h
- enableSizeModeButton() : mixed
- Enable size_mode button
- enableStripedMonths() : mixed
- Add background striped on columns
- enableStripedRows() : mixed
- Add background striped on rows
- enableViewModeButton() : mixed
- Enable view_mode button
- getEndDate() : mixed
- Return date end gantt
- getSizeMode() : mixed
- Get size mode
- getStartDate() : mixed
- Return date start gantt
- getViewMode() : mixed
- Get view mode
- removeSpaceBetweenEvents() : mixed
- Remove spaces between events
- renderPopover() : mixed
- Render title popover
- setDayClickAction() : mixed
- Define the day click action
- setEventClickAction() : mixed
- Define click event action
- setInterval() : mixed
- Define interval between dates
- setReloadAction() : mixed
- Define reload events action
- setSizeMode() : mixed
- Define view mode
- setStartDate() : mixed
- Define date start gantt
- setTitle() : mixed
- Define title of header gantt
- setTransformerEventLabel() : mixed
- Define transformer event label
- setTransformerTimeTitle() : mixed
- Define transformer time title
- setViewMode() : mixed
- Change view mode
- show() : mixed
- getColumnSize() : mixed
- Rerturn size column based into a zoom level
- getDates() : mixed
- Return dates into interval
- geTimeTitle() : mixed
- Return title gantt
- getPixelValue() : mixed
- Return pixel value step minutes
- renderAside() : mixed
- Render rows
- renderDailyHeader() : mixed
- Render header table days
- renderDailyHourHeader() : mixed
- Render header table hours
- renderEvent() : mixed
- Render event
- renderGantt() : mixed
- Render gantt
- renderHeader() : mixed
- renderMonthDayHeader() : mixed
- Render header table month day
- renderMonthHeader() : mixed
- Render header table month
- renderTimeTable() : mixed
- Render time table
- renderTimeTableHeader() : mixed
- Render header table
Constants
ADJUST_MARGIN
public
mixed
ADJUST_MARGIN
= ['xs' => 0, 'sm' => 2, 'md' => 4, 'lg' => 10]
COLUMNHOURVAL
public
mixed
COLUMNHOURVAL
= 24
HOURS
public
mixed
HOURS
= ['00', '01', '12', '18']
HOURS_24
public
mixed
HOURS_24
= ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23']
MODE_DAYS
public
mixed
MODE_DAYS
= 'MODE_DAYS'
MODE_DAYS_WITH_HOUR
public
mixed
MODE_DAYS_WITH_HOUR
= 'MODE_DAYS_WITH_HOUR'
MODE_MONTHS
public
mixed
MODE_MONTHS
= 'MODE_MONTHS'
MODE_MONTHS_WITH_DAY
public
mixed
MODE_MONTHS_WITH_DAY
= 'MODE_MONTHS_WITH_DAY'
SIZES
public
mixed
SIZES
= ['xs', 'sm', 'md', 'lg']
SIZESPX
public
mixed
SIZESPX
= [30, 60, 120, 240]
SIZESPXHORAS
public
mixed
SIZESPXHORAS
= [120, 240, 480, 960]
Properties
$count_hours
private
mixed
$count_hours
$dates
private
mixed
$dates
= []
$dayClickAction
private
mixed
$dayClickAction
$dragEvent
private
mixed
$dragEvent
$end_date
private
mixed
$end_date
$eventAction
private
mixed
$eventAction
$events
private
mixed
$events
$headerActions
private
mixed
$headerActions
= []
$hours
private
mixed
$hours
$interval
private
mixed
$interval
$minutesStep
private
mixed
$minutesStep
$reloadAction
private
mixed
$reloadAction
$remove_space
private
mixed
$remove_space
= FALSE
$rows
private
mixed
$rows
$size
private
mixed
$size
$size_mode_button
private
mixed
$size_mode_button
= FALSE
$size_mode_options
private
mixed
$size_mode_options
$start_date
private
mixed
$start_date
$stripedMonths
private
mixed
$stripedMonths
= FALSE
$stripedRows
private
mixed
$stripedRows
= FALSE
$title
private
mixed
$title
= ''
$transformEventLabel
private
mixed
$transformEventLabel
= NULL
$transformTimeTitle
private
mixed
$transformTimeTitle
= NULL
$updateAction
private
mixed
$updateAction
$view_mode
private
mixed
$view_mode
$view_mode_button
private
mixed
$view_mode_button
= FALSE
$view_mode_options
private
mixed
$view_mode_options
Methods
__construct()
Constructor method
public
__construct(mixed $view_mode[, mixed $size = 'md' ]) : mixed
Parameters
- $view_mode : mixed
- $size : mixed = 'md'
addEvent()
Add new event on Gantt
public
addEvent( $id, $rowId, $title, $start_time, $end_time[, $color = NULL ][, $percent = null ]) : mixed
Parameters
addHeaderAction()
Define reload events action
public
addHeaderAction(TAction $action[, $label = '' ][, $icon = null ]) : mixed
Parameters
- $action : TAction
- $label : = ''
-
String Button label
- $icon : = null
-
TImage Button icon
addHeaderWidget()
Add a form header widget
public
addHeaderWidget( $widget) : mixed
Parameters
addRow()
Add new row
public
addRow( $id, mixed $label) : mixed
Parameters
clearEvents()
public
clearEvents() : mixed
enableDragEvent()
Define drag event action
public
enableDragEvent(TAction $updateAction[, mixed $minutesStep = 1440 ]) : mixed
Parameters
- $updateAction : TAction
- $minutesStep : mixed = 1440
enableFullHours()
Enable hour when MODE_DAYS_WITH_HOUR 24h
public
enableFullHours() : mixed
enableSizeModeButton()
Enable size_mode button
public
enableSizeModeButton([mixed $with_label = TRUE ][, mixed $with_icon = TRUE ][, mixed $label = NULL ][, mixed $icon = NULL ]) : mixed
Parameters
- $with_label : mixed = TRUE
- $with_icon : mixed = TRUE
- $label : mixed = NULL
- $icon : mixed = NULL
enableStripedMonths()
Add background striped on columns
public
enableStripedMonths() : mixed
enableStripedRows()
Add background striped on rows
public
enableStripedRows() : mixed
enableViewModeButton()
Enable view_mode button
public
enableViewModeButton([mixed $with_label = TRUE ][, mixed $with_icon = TRUE ][, mixed $label = NULL ][, mixed $icon = NULL ]) : mixed
Parameters
- $with_label : mixed = TRUE
- $with_icon : mixed = TRUE
- $label : mixed = NULL
- $icon : mixed = NULL
getEndDate()
Return date end gantt
public
getEndDate() : mixed
getSizeMode()
Get size mode
public
getSizeMode() : mixed
getStartDate()
Return date start gantt
public
getStartDate() : mixed
getViewMode()
Get view mode
public
getViewMode() : mixed
removeSpaceBetweenEvents()
Remove spaces between events
public
removeSpaceBetweenEvents() : mixed
renderPopover()
Render title popover
public
static renderPopover( $title, $poptitle, $popcontent) : mixed
Parameters
setDayClickAction()
Define the day click action
public
setDayClickAction( $action) : mixed
Parameters
setEventClickAction()
Define click event action
public
setEventClickAction( $action) : mixed
Parameters
setInterval()
Define interval between dates
public
setInterval([ $interval = '1 month' ]) : mixed
Parameters
setReloadAction()
Define reload events action
public
setReloadAction( $reloadAction) : mixed
Parameters
setSizeMode()
Define view mode
public
setSizeMode(mixed $size) : mixed
Parameters
- $size : mixed
setStartDate()
Define date start gantt
public
setStartDate( $date) : mixed
Parameters
setTitle()
Define title of header gantt
public
setTitle( $title) : mixed
Parameters
setTransformerEventLabel()
Define transformer event label
public
setTransformerEventLabel(callable $transformEventLabel) : mixed
$transformer callable (object event, events, times)
Parameters
- $transformEventLabel : callable
setTransformerTimeTitle()
Define transformer time title
public
setTransformerTimeTitle(callable $transformer) : mixed
$transformer callable (start, end, events)
Parameters
- $transformer : callable
setViewMode()
Change view mode
public
setViewMode(mixed $view_mode) : mixed
Parameters
- $view_mode : mixed
show()
public
show() : mixed
getColumnSize()
Rerturn size column based into a zoom level
private
getColumnSize() : mixed
getDates()
Return dates into interval
private
getDates() : mixed
geTimeTitle()
Return title gantt
private
geTimeTitle() : mixed
getPixelValue()
Return pixel value step minutes
private
getPixelValue() : mixed
renderAside()
Render rows
private
renderAside() : mixed
renderDailyHeader()
Render header table days
private
renderDailyHeader( $time_table) : mixed
Parameters
renderDailyHourHeader()
Render header table hours
private
renderDailyHourHeader( $time_table) : mixed
Parameters
renderEvent()
Render event
private
renderEvent( $event) : mixed
Parameters
renderGantt()
Render gantt
private
renderGantt() : mixed
renderHeader()
private
renderHeader() : mixed
renderMonthDayHeader()
Render header table month day
private
renderMonthDayHeader( $time_table) : mixed
Parameters
renderMonthHeader()
Render header table month
private
renderMonthHeader( $time_table) : mixed
Parameters
renderTimeTable()
Render time table
private
renderTimeTable() : mixed
renderTimeTableHeader()
Render header table
private
renderTimeTableHeader( $table) : mixed