public function HandlerBase::getDateFormat in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/src/Plugin/views/HandlerBase.php \Drupal\views\Plugin\views\HandlerBase::getDateFormat()
Creates cross-database SQL date formatting.
Parameters
string $format: A format string for the result, like 'Y-m-d H:i:s'.
Return value
string An appropriate SQL string for the DB type and field type.
2 calls to HandlerBase::getDateFormat()
- Date::getFormula in core/
modules/ views/ src/ Plugin/ views/ argument/ Date.php - Date::query in core/
modules/ views/ src/ Plugin/ views/ sort/ Date.php - Called to add the sort to a query.
2 methods override HandlerBase::getDateFormat()
- Date::getDateFormat in core/
modules/ datetime/ src/ Plugin/ views/ sort/ Date.php - Overridden in order to pass in the string date flag.
- Date::getDateFormat in core/
modules/ datetime/ src/ Plugin/ views/ argument/ Date.php - Creates cross-database SQL date formatting.
File
- core/
modules/ views/ src/ Plugin/ views/ HandlerBase.php, line 629
Class
- HandlerBase
- Base class for Views handler plugins.
Namespace
Drupal\views\Plugin\viewsCode
public function getDateFormat($format) {
return $this->query
->getDateFormat($this
->getDateField(), $format);
}