include/generic/SugarWidgets/SugarWidgetFieldtime.php
\SugarWidgetFieldTime
Generic Sugar widget
Properties

$assigned_user= 'null'
nullDetails- Type
- n/a
- Inherited_from
- \SugarWidgetFieldDateTime::$$assigned_user

$form_value= ''
- Type
- n/a
- Inherited_from
- \SugarWidget::$$form_value
- Inherited_from
- \SugarWidgetField::$$form_value
- Inherited_from
- \SugarWidgetReportField::$$form_value
- Inherited_from
- \SugarWidgetFieldDateTime::$$form_value

$layout_manager= 'null'
nullDetails- Type
- n/a
- Inherited_from
- \SugarWidget::$$layout_manager
- Inherited_from
- \SugarWidgetField::$$layout_manager
- Inherited_from
- \SugarWidgetReportField::$$layout_manager
- Inherited_from
- \SugarWidgetFieldDateTime::$$layout_manager

\SugarBean
$reporter= ''
- Type
- \SugarBean
- Inherited_from
- \SugarWidgetFieldDateTime::$$reporter

$widget_id= ''
- Type
- n/a
- Inherited_from
- \SugarWidget::$$widget_id
- Inherited_from
- \SugarWidgetField::$$widget_id
- Inherited_from
- \SugarWidgetReportField::$$widget_id
- Inherited_from
- \SugarWidgetFieldDateTime::$$widget_id
Methods

SugarWidget(
$layout_manager
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_manager |

SugarWidgetField(
$layout_manager
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_manager |

SugarWidgetFieldDateTime(
$layout_manager
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_manager |

SugarWidgetReportField(
$layout_manager
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_manager |

_get_column_alias(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

_get_column_select(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

_get_column_select_special(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

_get_list_value(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displayDetail(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displayDetailLabel(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displayEdit(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displayEditLabel(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displayHeaderCell(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displayHeaderCellPlain(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displayInput(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displayListPlain(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displayListday(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displayListmonth(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displayListquarter(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displayListyear(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displaySearch(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

displaySearchLabel(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

expandDate(
\$date $date, bool $end
=
false
)
:
\$date
This function helps to convert a date only value to have a time value as well. It first checks to see if a time value exists. If a time value exists, the function just returns the date value passed in. If the date value is the 'Today' macro then some special processing occurs as well. Finally the time portion is applied depending on whether or not this date should be for the end in which case the 23:59:59 time value is applied otherwise 00:00:00 is used.
| Name | Type | Description |
|---|---|---|
| $date | \$date | String value of the date value to expand |
| $end | bool | Boolean value indicating whether or not this is for an end time period or not |
| Type | Description |
|---|---|
| \$date | TimeDate object with time value applied |

getSubClass(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

getTruncatedColumnAlias(
$column_name
)
:
voidgetTruncatedColumnAlias This function ensures that a column alias is no more than 28 characters. Should the column_name argument exceed 28 charcters, it creates an alias using the first 22 characters of the column_name plus an md5 of the first 6 characters of the lowercased column_name value.
Inherited from: \SugarWidget::getTruncatedColumnAlias()\SugarWidgetField::getTruncatedColumnAlias()\SugarWidgetReportField::getTruncatedColumnAlias()\SugarWidgetFieldDateTime::getTruncatedColumnAlias()| Name | Type | Description |
|---|---|---|
| $column_name |

getVardef(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

getWidgetId(
)
:
\idgetSubpanelWidgetId This is a utility function to return a widget's unique id
Inherited from: \SugarWidget::getWidgetId()\SugarWidgetField::getWidgetId()\SugarWidgetReportField::getWidgetId()\SugarWidgetFieldDateTime::getWidgetId()| Type | Description |
|---|---|
| \id | String label of the widget's unique id |

get_db_date(
int $days, \time $time
)
:
voidGet specified date and time for a particalur day, in current user's timezone.
Inherited from: \SugarWidgetFieldDateTime::get_db_date()| Name | Type | Description |
|---|---|---|
| $days | int | Adjust date by this number of days, negative values are valid. |
| $time | \time | string falg for desired time value, start: minimum time, end: maximum time, default: current time |

get_start_end_date_filter(
array $layout_def, string $begin, string $end
)
:
voidGet filter string for a date field.
Inherited from: \SugarWidgetFieldDateTime::get_start_end_date_filter()| Name | Type | Description |
|---|---|---|
| $layout_def | array | layout_def field def for field being filtered |
| $begin | string | start date value (in DB format) |
| $end | string | End date value (in DB format) |

get_time_part(
$date_time_value
)
:
void| Name | Type | Description |
|---|---|---|
| $date_time_value |

get_users_current_date_time(
boolean $timestamp
=
false
)
:
voidGet assigned or logged in user's current date and time value.
Inherited from: \SugarWidgetFieldDateTime::get_users_current_date_time()| Name | Type | Description |
|---|---|---|
| $timestamp | boolean | Format of return value, if set to true, return unix like timestamp , else a formatted date. |

hasTime(
$date
)
:
bool| Name | Type | Description |
|---|---|---|
| $date |
| Type | Description |
|---|---|
| bool | false if the date is a only a date, true if the date includes time. |

queryDateOp(
string $arg1, string | \DateTime $arg2, string $op, string $type
)
:
voidCreate query for binary operation of field of certain type Produces query like: arg1 op to_date(arg2), e.g.: date_closed < '2009-12-01'
Inherited from: \SugarWidgetFieldDateTime::queryDateOp()| Name | Type | Description |
|---|---|---|
| $arg1 | string | 1st arg - column name |
| $arg2 | string | \DateTime | 2nd arg - value to be converted |
| $op | string | |
| $type | string |

queryDay(
array $layout_def, \SugarDateTime $day
)
:
voidCreate query from the beginning to the end of certain day
Inherited from: \SugarWidgetFieldDateTime::queryDay()| Name | Type | Description |
|---|---|---|
| $layout_def | array | |
| $day | \SugarDateTime |

queryFilter(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterAfter(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterBefore(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterBetween_Dates(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterEmpty(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterIs(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterNot_Empty(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterNot_Equals_str(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterOn(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_last_30_days(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_last_7_days(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_last_month(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_last_year(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_next_30_days(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_next_7_days(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_next_month(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_next_year(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_this_month(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_this_quarter(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_this_year(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_today(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_tomorrow(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilterTP_yesterday(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryFilteris_not(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryGroupBy(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryGroupByDay(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryGroupByMonth(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryGroupByQuarter(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryGroupByYear(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

queryMonth(
array $layout_def, \SugarDateTime $month
)
:
voidCreate query from the beginning to the end of certain month
Inherited from: \SugarWidgetFieldDateTime::queryMonth()| Name | Type | Description |
|---|---|---|
| $layout_def | array | |
| $month | \SugarDateTime |

queryOrderBy(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

querySelect(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

querySelectday(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

querySelectmonth(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

querySelectquarter(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

querySelectyear(
$layout_def
)
:
void| Name | Type | Description |
|---|---|---|
| $layout_def |

setWidgetId(
\id $id
=
''
)
:
voidsetSubpanelWidgetId This is a utility function to set the id for a widget
Inherited from: \SugarWidget::setWidgetId()\SugarWidgetField::setWidgetId()\SugarWidgetReportField::setWidgetId()\SugarWidgetFieldDateTime::setWidgetId()| Name | Type | Description |
|---|---|---|
| $id | \id | String value to set the widget's unique id |