public static function listAll() { $arr = parent::lister(get_class(), null, null); $ret = array(); foreach ($arr as $item) { if (!empty($item)) { $ret[] = $item; } } return $ret; }
public static function listAll($group = null) { return parent::lister(get_class(), null, null, "namn", null, null, null, null, $group); }
public static function getMedlemFolders($medlem) { return parent::lister(get_class(), "medlem_id", $medlem->getId(), "folder_name"); }
public static function listByForetag(Foretag $foretag) { return parent::lister(get_class(), "foretag_id", $foretag->getId()); }
public static function listByKommunId($id) { return parent::lister(get_class(), "kommun_id", $id); }
public static function listAll() { Security::demand(SUPERADMIN); return parent::lister(get_class()); }
public static function listAll() { return parent::lister(get_class()); }
/** * List all "foretag". If $showValid is true then an extra "where" parameter isValid = 1 is added. * It is only possible to send one or none parameter to "Mobject->lister" some trix are made here (Dr. Krillo) * * See Mobject->lister for more details about parameters * * Changed by krillo 20090426 */ public static function listForetag($offset, $limit, $field, $search, $way, $showValid = null) { $newField = "id"; //if (DEBUG) { // echo "Foretag.php->listForetag()<br>"; // echo "showValid = " .$showValid . "<br>"; // echo "field = " .$field . "<br>"; // echo "search = " .$search . "<br>"; //} //if no params at all, add "isValid = 1" when missing or not false if ($field == null && $search == null && ($showValid == "true" || $showValid == null)) { $newField = "isValid"; $search = 1; //if(DEBUG){ // echo "first <br>"; //} } else { if ($field != null && $search != null && ($showValid == "true" || $showValid == null)) { //trick in the extra param $newField = "isValid=1 and " . $field; //if(DEBUG){ // echo "second <br>"; //} } else { $newField = $field; //if(DEBUG){ // echo "third - all fields <br>"; //} } } return parent::lister(get_class(), $newField, $search, "id", $offset, $limit, $search, $way); }
/** * List all orders. If $showValid is true then an extra "where" parameter isValid = 1 is added. * It is only possible to send one or none parameter to "Mobject->lister" some trix are made here (Dr. Krillo) * See Mobject->lister for more details about parameters * created by krillo 20090804 */ public static function listOrderKrillo($offset, $limit, $field, $search, $way, $showValid = null, $showForetag = false) { $newField = "id"; $foretagString = ""; if ($showForetag) { $foretagString = " typ IN ('foretag', 'foretag_tillagg', 'foretag_again' ) AND "; } switch (true) { //if no params at all, add "isValid = 1" case $field == null && $search == null && ($showValid == "true" || $showValid == null): $newField = "isValid"; $search = 1; break; case $field != null && $search != null && ($showValid == "true" || $showValid == null): $newField = "isValid=1 and " . $field; //trick in the extra param break; default: $newField = $field; break; } $newField = $foretagString . $newField; return parent::lister(get_class(), $newField, $search, "id", $offset, $limit, $search, $way); }
public static function loadByMedlem(Medlem $medlem) { $medlem_id = $medlem->getId(); return parent::lister(get_class(), "medlem_id", $medlem_id, "tillagd"); }
public static function listAll() { return parent::lister(get_class(), null, null, "namn"); }
public static function listPublic() { return parent::lister(get_class(), "publik", "1"); }
public static function listByLan($lan) { $kommuner = parent::lister(get_class(), "lan", $lan, "`namn`"); return $kommuner; }
public static function listByQuizFraga(QuizFraga $quizFraga) { return parent::lister(get_class(), "quizFraga_id", $quizFraga->getId()); }
public static function deleteUserStrackor(Medlem $medlem, $cleared = true) { if (Security::authorized(ADMIN) or Security::authorized(USER, $medlem)) { if ($cleared) { $strackor = parent::lister(get_class(), "medlem_id", $medlem->getId()); } else { $strackor; } foreach ($strackor as $stracka) { $stracka->delete(); } } }
public static function listMedlemmar($offset, $limit, $sort, $search, $way) { $arr = parent::lister(get_class(), $sort, null, $sort, $offset, $limit, $search, $way); $ret = array(); foreach ($arr as $medlem) { if (!empty($medlem)) { $ret[] = $medlem; } } return $ret; }
public static function listByKommun(Kommun $kommun) { return parent::lister(get_class(), "kommun_id", $kommun->getId(), "id"); }
public static function removeAllMemberMail(Medlem $medlem) { if (Security::authorized(ADMIN) or Security::authorized(USER, $medlem)) { global $db; $fromMail = parent::lister(get_class(), "from_id", $medlem->getId()); foreach ($fromMail as $mail) { $mail->delete(); } $toMail = parent::lister(get_class(), "to_id", $medlem->getId()); foreach ($toMail as $mail) { $mail->delete(); } } }
public static function listAllRandom() { $list = parent::lister(get_class()); $randlist = shuffle($list); return $randlist; }
public static function loadByGroupId($gid) { return parent::lister(get_class(), "grupp_id", $gid); }