include/generic/SugarWidgets/SugarWidgetFielddatetime.php

Show: inherited
Table of Contents

\SugarWidgetFieldDateTime

Package:

Generic Sugar widget

Parent(s)
\SugarWidgetReportField < \SugarWidgetField < \SugarWidget
Children
\SugarWidgetFieldTime
\SugarWidgetFieldDatePicker
\SugarWidgetFieldDate
\SugarWidgetFieldDateTimecombo

Properties

Propertypublic  $assigned_user= 'null'
Default valuenullDetails
Type
n/a
Propertypublic  $layout_manager= 'null'
Default valuenullDetails
Type
n/a
Inherited_from
\SugarWidget::$$layout_manager  
Inherited_from
\SugarWidgetField::$$layout_manager  
Inherited_from
\SugarWidgetReportField::$$layout_manager  
Propertypublic\SugarBean  $reporter= ''

Layout manager reporter attribute

Details
Type
\SugarBean

Methods

methodpublicSugarWidget(  $layout_manager ) : void
Parameters
Name Type Description
$layout_manager
methodpublicSugarWidgetField(  $layout_manager ) : void
Parameters
Name Type Description
$layout_manager
methodpublicSugarWidgetFieldDateTime(  $layout_manager ) : void

Parameters
Name Type Description
$layout_manager
methodpublicSugarWidgetReportField(  $layout_manager ) : void
Parameters
Name Type Description
$layout_manager
methodpublic_get_column_alias(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublic_get_column_select(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublic_get_column_select_special(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublic_get_list_value(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublicdisplay(  $layout_def ) : void
inherited

Inherited from: \SugarWidgetReportField::display()
Parameters
Name Type Description
$layout_def
methodpublicdisplayDetail(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublicdisplayDetailLabel(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublicdisplayEdit(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublicdisplayEditLabel(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublicdisplayHeaderCell(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublicdisplayHeaderCellPlain(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublicdisplayInput(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicdisplayList(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicdisplayListPlain(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicdisplayListday(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicdisplayListmonth(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicdisplayListquarter(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicdisplayListyear(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicdisplaySearch(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublicdisplaySearchLabel(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodprotectedexpandDate( \$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.

Parameters
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

Returns
Type Description
\$date TimeDate object with time value applied
methodpublicgetAssignedUser( ) : void

methodpublicgetReporter( ) : void

Details
Deprecated
 
methodpublicgetSubClass(  $layout_def ) : void
inherited

Inherited from: \SugarWidgetReportField::getSubClass()
Parameters
Name Type Description
$layout_def
methodprotectedgetTruncatedColumnAlias(  $column_name ) : void
inherited

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()
Parameters
Name Type Description
$column_name
methodpublicgetVardef(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublicgetWidgetId( ) : \id
inherited

getSubpanelWidgetId This is a utility function to return a widget's unique id

Inherited from: \SugarWidget::getWidgetId()\SugarWidgetField::getWidgetId()\SugarWidgetReportField::getWidgetId()
Returns
Type Description
\id String label of the widget's unique id
methodpublicget_db_date( int $days, \time $time ) : void

Get specified date and time for a particalur day, in current user's timezone.

Parameters
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

methodpublicget_start_end_date_filter( array $layout_def, string $begin, string $end ) : void

Get filter string for a date field.

Parameters
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)

methodpublicget_time_part(  $date_time_value ) : void

Parameters
Name Type Description
$date_time_value
methodpublicget_users_current_date_time( boolean $timestamp = false ) : void

Get assigned or logged in user's current date and time value.

Parameters
Name Type Description
$timestamp boolean

Format of return value, if set to true, return unix like timestamp , else a formatted date.

methodprotectedhasTime(  $date ) : bool

Parameters
Name Type Description
$date
Returns
Type Description
bool false if the date is a only a date, true if the date includes time.
methodprotectednow( ) : \SugarDateTime

Return current date in required user's TZ

Returns
Type Description
\SugarDateTime
methodpublicquery(  $layout_def ) : void
inherited

Inherited from: \SugarWidgetReportField::query()
Parameters
Name Type Description
$layout_def
methodprotectedqueryDateOp( 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'

Parameters
Name Type Description
$arg1 string

1st arg - column name

$arg2 string | \DateTime

2nd arg - value to be converted

$op string
$type string
methodprotectedqueryDay( array $layout_def, \SugarDateTime $day ) : void

Create query from the beginning to the end of certain day

Parameters
Name Type Description
$layout_def array
$day \SugarDateTime
methodpublicqueryFilter(  $layout_def ) : void
inherited

Inherited from: \SugarWidgetReportField::queryFilter()
Parameters
Name Type Description
$layout_def
methodpublicqueryFilterAfter(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterBefore(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterBetween_Dates(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterEmpty(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublicqueryFilterIs(  $layout_def ) : void
inherited

Inherited from: \SugarWidgetReportField::queryFilterIs()
Parameters
Name Type Description
$layout_def
methodpublicqueryFilterNot_Empty(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublicqueryFilterNot_Equals_str(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterOn(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_last_30_days(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_last_7_days(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_last_month(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_last_year(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_next_30_days(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_next_7_days(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_next_month(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_next_year(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_this_month(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_this_quarter(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_this_year(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_today(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_tomorrow(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilterTP_yesterday(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryFilteris_not(  $layout_def ) : void
Parameters
Name Type Description
$layout_def
methodpublicqueryGroupBy(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryGroupByDay(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryGroupByMonth(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryGroupByQuarter(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicqueryGroupByYear(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodprotectedqueryMonth( array $layout_def, \SugarDateTime $month ) : void

Create query from the beginning to the end of certain month

Parameters
Name Type Description
$layout_def array
$month \SugarDateTime
methodpublicqueryOrderBy(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicquerySelect(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicquerySelectday(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicquerySelectdayreal( \$layout_def $layout_def ) : string

Select addon datetime field for "day" field in reports

Parameters
Name Type Description
$layout_def \$layout_def

array definition of new field

Returns
Type Description
string piece for creation "select" query
methodpublicquerySelectmonth(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicquerySelectquarter(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicquerySelectyear(  $layout_def ) : void

Parameters
Name Type Description
$layout_def
methodpublicsetParentBean(  $parent_bean ) : void
Parameters
Name Type Description
$parent_bean
methodpublicsetWidgetId( \id $id = '' ) : void
inherited

setSubpanelWidgetId This is a utility function to set the id for a widget

Inherited from: \SugarWidget::setWidgetId()\SugarWidgetField::setWidgetId()\SugarWidgetReportField::setWidgetId()
Parameters
Name Type Description
$id \id

String value to set the widget's unique id

Documentation was generated by DocBlox 0.18.1.