function jevResetFilter($contentElement) { $this->filterNullValue = -1; $this->filterType = "reset"; $this->filterField = ""; parent::jevFilter($contentElement, ""); }
function jevJustmineFilter($tablename, $filterfield, $isstring = true, $yesLabel = "Jev_Yes", $noLabel = "Jev_No") { $this->filterNullValue = "0"; $this->yesLabel = JText::_($yesLabel); $this->noLabel = JText::_($noLabel); $this->filterType = "justmine"; $this->filterLabel = JText::_("Show_Only_My_Events"); // this is a special filter - we always want memory here since only used in frontend management $this->filter_value = JFactory::getApplication()->getUserStateFromRequest($this->filterType . '_fv_ses', $this->filterType . '_fv', $this->filterNullValue); JRequest::setVar($this->filterType . '_fv', $this->filter_value); parent::jevFilter($tablename, "state", $isstring); }
function jevPublishedFilter($tablename, $filterfield, $isstring = true, $yesLabel = "Jev_Yes", $noLabel = "Jev_No") { $this->filterNullValue = "0"; $this->allLabel = JText::_('ALL'); $this->yesLabel = JText::_($yesLabel); $this->noLabel = JText::_($noLabel); $this->filterType = "published"; $this->filterLabel = JText::_("Show_Unpublished_Events"); // this is a special filter - we always want memory here since only used in frontend management $this->filter_value = JFactory::getApplication()->getUserStateFromRequest($this->filterType . '_fv_ses', $this->filterType . '_fv', $this->filterNullValue); JRequest::setVar($this->filterType . '_fv', $this->filter_value); parent::jevFilter($tablename, "state", $isstring); // event creators can look at their own unpublished events if (!JEVHelper::isEventCreator()) { $this->filter_value = $this->filterNullValue; } }
function __construct($tablename, $filterfield, $isstring = true, $yesLabel = "Jev_Yes", $noLabel = "Jev_No") { $this->filterType = self::filterType; $task = JRequest::getVar('view', '') . '.' . JRequest::getVar('layout', ''); if ($task == "admin.listevents") { $default_filter = "-1"; } else { $default_filter = "0"; } $this->filterNullValue = $default_filter; $this->allLabel = JText::_('ALL'); $this->yesLabel = JText::_($yesLabel); $this->noLabel = JText::_($noLabel); $this->filterLabel = JText::_("Show_Unpublished_Events"); // this is a special filter - we always want memory here since only used in frontend management $this->filter_value = JFactory::getApplication()->getUserStateFromRequest($this->filterType . '_fv_ses', $this->filterType . '_fv', $this->filterNullValue); JRequest::setVar($this->filterType . '_fv', $this->filter_value); parent::jevFilter($tablename, "state", $isstring); // event creators can look at their own unpublished events if (!JEVHelper::isEventCreator()) { $this->filter_value = $this->filterNullValue; } }
function jevTitleFilter($tablename, $filterfield, $isstring = true) { $this->filterNullValue = ""; $this->filterType = "title"; parent::jevFilter($tablename, $filterfield, true); }