/** * Function to allow the creation of search defaults in code * * @see getSearchFilter() * * @return array */ public function getSearchDefaults() { if (!$this->defaultSearchData) { $orgId = $this->currentOrganization->getId(); $this->defaultSearchData[-1] = "gtr_organizations LIKE '%|{$orgId}|%'"; } return parent::getSearchDefaults(); }
/** * Function to allow the creation of search defaults in code * * @see getSearchFilter() * * @return array */ public function getSearchDefaults() { if (!$this->defaultSearchData) { $from = new \MUtil_Date(); $from->subWeek(2); $until = new \MUtil_Date(); $until->addDay(1); $this->defaultSearchData = array('datefrom' => $from, 'dateuntil' => $until); } return parent::getSearchDefaults(); }
/** * Function to allow the creation of search defaults in code * * @see getSearchFilter() * * @return array */ public function getSearchDefaults() { if (!$this->defaultSearchData) { $from = new \MUtil_Date(); $from->subWeek(2); $until = new \MUtil_Date(); $until->addDay(1); $this->defaultSearchData = array(\Gems_Snippets_AutosearchFormSnippet::PERIOD_DATE_USED => 'grco_created', 'grco_organization' => $this->loader->getOrganization()->getId(), 'datefrom' => $from, 'dateuntil' => $until); } return parent::getSearchDefaults(); }
/** * Function to allow the creation of search defaults in code * * @see getSearchFilter() * * @return array */ public function getSearchDefaults() { if (!$this->defaultSearchData) { $orgId = $this->currentOrganization->getId(); $this->defaultSearchData[-1] = "((gsu_insertable = 1 AND gsu_insert_organizations LIKE '%|{$orgId}|%') OR\r\n EXISTS\r\n (SELECT gro_id_track FROM gems__tracks INNER JOIN gems__rounds ON gtr_id_track = gro_id_track\r\n WHERE gro_id_survey = gsu_id_survey AND gtr_organizations LIKE '%|{$orgId}|%'\r\n ))"; } return parent::getSearchDefaults(); }
/** * Function to allow the creation of search defaults in code * * @see getSearchFilter() * * @return array */ public function getSearchDefaults() { if (!$this->defaultSearchData) { $inFormat = \MUtil_Model_Bridge_FormBridge::getFixedOption('date', 'dateFormat'); $now = new \MUtil_Date(); $today = $now->toString($inFormat); $this->defaultSearchData = array('datefrom' => $today, 'dateused' => '_gto_valid_from gto_valid_until', 'dateuntil' => $today, 'main_filter' => 'all'); } return parent::getSearchDefaults(); }
/** * Function to allow the creation of search defaults in code * * @see getSearchFilter() * * @return array */ public function getSearchDefaults() { if (!$this->defaultSearchData) { $org = $this->currentOrganization; $this->defaultSearchData = array('gap_id_organization' => $org->canHaveRespondents() ? $org->getId() : null, 'dateused' => 'gap_admission_time', 'datefrom' => new \MUtil_Date()); } return parent::getSearchDefaults(); }