Back to ListModel class

Method getEmptyStateQuery

protected \Joomla\Database\DatabaseQuery
getEmptyStateQuery
()
Provide a query to be used to evaluate if this is an Empty State, can be overridden in the model to provide granular control.
Returns
  • \Joomla\Database\DatabaseQuery
Since
  • 4.0.0
Class: ListModel
Project: Joomla

Method getEmptyStateQuery - Source code

/**
 * Provide a query to be used to evaluate if this is an Empty State, can be overridden in the model to provide granular control.
 *
 * @return DatabaseQuery
 *
 * @since 4.0.0
 */
protected function getEmptyStateQuery()
{
    $query = clone $this->_getListQuery();
    if ($query instanceof DatabaseQuery) {
        $query->clear('bounded')->clear('group')->clear('having')->clear('join')->clear('values')->clear('where');
    }
    return $query;
}