include/generic/SugarWidgets/SugarWidgetFielddatetime.php
\SugarWidgetFieldDateTime
Generic Sugar widget
- Parent(s)
- \SugarWidgetReportField < \SugarWidgetField < \SugarWidget
- Children
- \SugarWidgetFieldTime
- \SugarWidgetFieldDatePicker
- \SugarWidgetFieldDate
- \SugarWidgetFieldDateTimecombo
Properties
$form_value= ''
- Type
- n/a
- Inherited_from
- \SugarWidget::$$form_value
- Inherited_from
- \SugarWidgetField::$$form_value
- Inherited_from
- \SugarWidgetReportField::$$form_value
$layout_manager= 'null'
null
Details- Type
- n/a
- Inherited_from
- \SugarWidget::$$layout_manager
- Inherited_from
- \SugarWidgetField::$$layout_manager
- Inherited_from
- \SugarWidgetReportField::$$layout_manager
$parent_bean= ''
- Type
- n/a
- Inherited_from
- \SugarWidget::$$parent_bean
- Inherited_from
- \SugarWidgetField::$$parent_bean
- Inherited_from
- \SugarWidgetReportField::$$parent_bean
$widget_id= ''
- Type
- n/a
- Inherited_from
- \SugarWidget::$$widget_id
- Inherited_from
- \SugarWidgetField::$$widget_id
- Inherited_from
- \SugarWidgetReportField::$$widget_id
Methods
SugarWidget(
$layout_manager
)
:
void
Name | Type | Description |
---|---|---|
$layout_manager |
SugarWidgetField(
$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 |
display(
$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 |
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 |
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
expandDate
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 |
getParentBean(
)
:
void
getSubClass(
$layout_def
)
:
void
Name | Type | Description |
---|---|---|
$layout_def |
getTruncatedColumnAlias(
$column_name
)
:
void
getTruncatedColumnAlias 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()Name | Type | Description |
---|---|---|
$column_name |
getWidgetId(
)
:
\id
getSubpanelWidgetId This is a utility function to return a widget's unique id
Inherited from: \SugarWidget::getWidgetId()\SugarWidgetField::getWidgetId()\SugarWidgetReportField::getWidgetId()Type | Description |
---|---|
\id | String label of the widget's unique id |
get_db_date(
int $days, \time $time
)
:
void
Get specified date and time for a particalur day, in current user's timezone.
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
)
:
void
Get filter string for a date field.
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_users_current_date_time(
boolean $timestamp
=
false
)
:
void
Get assigned or logged in user's current date and time value.
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. |
now(
)
:
\SugarDateTime
Return current date in required user's TZ
Type | Description |
---|---|
\SugarDateTime |
query(
$layout_def
)
:
void
Name | Type | Description |
---|---|---|
$layout_def |
queryDateOp(
string $arg1, string | \DateTime $arg2, string $op, string $type
)
:
void
Create query for binary operation of field of certain type Produces query like: arg1 op to_date(arg2), e.g.: date_closed < '2009-12-01'
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
)
:
void
Create query from the beginning to the end of certain day
Name | Type | Description |
---|---|---|
$layout_def | array | |
$day | \SugarDateTime |
queryFilter(
$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 |
queryFilteris_not(
$layout_def
)
:
void
Name | Type | Description |
---|---|---|
$layout_def |
queryMonth(
array $layout_def, \SugarDateTime $month
)
:
void
Create query from the beginning to the end of certain month
Name | Type | Description |
---|---|---|
$layout_def | array | |
$month | \SugarDateTime |
querySelectdayreal(
\$layout_def $layout_def
)
:
string
Select addon datetime field for "day" field in reports
Name | Type | Description |
---|---|---|
$layout_def | \$layout_def | array definition of new field |
Type | Description |
---|---|
string | piece for creation "select" query |
setParentBean(
$parent_bean
)
:
void
Name | Type | Description |
---|---|---|
$parent_bean |
setWidgetId(
\id $id
=
''
)
:
void
setSubpanelWidgetId This is a utility function to set the id for a widget
Inherited from: \SugarWidget::setWidgetId()\SugarWidgetField::setWidgetId()\SugarWidgetReportField::setWidgetId()Name | Type | Description |
---|---|---|
$id | \id | String value to set the widget's unique id |