public function find($filter = "", $limit = 0, $offset = 0, $order = "", $group = "", $having = "") { if (!$order) { $order = $this->_order_by_fields; } return parent::find($filter, $limit, $offset, $order, $group, $having); }
public function init() { Model_List_Db::setVisibility('visible'); Model_Db::setVisibility('visible'); }
public static function setVisibility($value = "visible") { self::$_visibility = $value; }
public function actionTrashcan($params) { Model_List_Db::setVisibility(''); Model_Db::setVisibility(''); $view = $this->htmlView("list_trashcan"); $trashcan = new Model_Trashcan($this->getStorage()); if ($_POST && isset($_POST['objects'])) { $mode = isset($_POST['restore']) ? 'restore' : (isset($_POST['cleanup']) ? 'cleanup' : ''); if ($mode) { foreach ($_POST['objects'] as $oname => $idlist) { $trashcan->{$mode}($oname, $idlist); } } } $olist = array(); foreach (array('Статьи' => 'Article', 'Разделы' => 'Topic', 'Комментарии' => 'Comment') as $title => $oname) { $list = $trashcan->getList($oname); if (count($list)) { $olist[$title] = $list; } unset($list); } $view->trashcan = $olist; return $view; }