예제 #1
0
 public function getSortingInstance($currentRule, $currentOrder, $usersTable)
 {
     require_once 'Sitengine/Grid/Sorting.php';
     $sorting = new Sitengine_Grid_Sorting($currentRule, $currentOrder);
     $sorting->addRule('cdate', 'desc', "{$this->_name}.cdate asc", "{$this->_name}.cdate desc")->addRule('mdate', 'desc', "{$this->_name}.mdate asc", "{$this->_name}.mdate desc")->addRule('publish', 'asc', "{$this->_name}.publish asc", "{$this->_name}.publish desc")->addRule('comment', 'asc', "{$this->_name}.comment asc", "{$this->_name}.comment desc")->addRule('name', 'asc', "{$usersTable}.name asc", "{$usersTable}.name desc")->addRule('firstname', 'asc', "{$usersTable}.firstname asc", "{$usersTable}.firstname desc")->addRule('lastname', 'asc', "{$usersTable}.lastname asc", "{$usersTable}.lastname desc")->addRule('nickname', 'asc', "{$usersTable}.nickname asc", "{$usersTable}.nickname desc")->setDefaultRule('cdate');
     return $sorting;
 }
예제 #2
0
 public function getSortingInstance($currentRule, $currentOrder)
 {
     require_once 'Sitengine/Grid/Sorting.php';
     $sorting = new Sitengine_Grid_Sorting($currentRule, $currentOrder);
     $sorting->addRule('lastLogin', 'desc', "{$this->_name}.lastLogin asc", "{$this->_name}.lastLogin desc")->addRule('cdate', 'desc', "{$this->_name}.cdate asc", "{$this->_name}.cdate desc")->addRule('mdate', 'desc', "{$this->_name}.mdate asc", "{$this->_name}.mdate desc")->addRule('enabled', 'asc', "{$this->_name}.enabled asc", "{$this->_name}.enabled desc")->addRule('locked', 'asc', "{$this->_name}.locked asc", "{$this->_name}.locked desc")->addRule('name', 'asc', "name asc", "name desc")->addRule('nickname', 'asc', "nickname asc", "nickname desc")->addRule('firstname', 'asc', "firstname asc", "firstname desc")->addRule('lastname', 'asc', "lastname asc", "lastname desc")->setDefaultRule('name');
     return $sorting;
 }
예제 #3
0
 public function getUserJoinSortingInstance($currentRule, $currentOrder)
 {
     $usersTableName = $this->getPermiso()->getUsersTableName();
     require_once 'Sitengine/Grid/Sorting.php';
     $sorting = new Sitengine_Grid_Sorting($currentRule, $currentOrder);
     $sorting->addRule('cdate', 'desc', "{$this->_name}.cdate asc", "{$this->_name}.cdate desc")->addRule('mdate', 'desc', "{$this->_name}.mdate asc", "{$this->_name}.mdate desc")->addRule('locked', 'asc', "{$this->_name}.locked asc", "{$this->_name}.locked desc")->addRule('publish', 'asc', "{$usersTableName}.publish asc", "{$usersTableName}.publish desc")->addRule('name', 'asc', "{$usersTableName}.name asc", "{$usersTableName}.name desc")->addRule('nickname', 'asc', "{$usersTableName}.nickname asc", "{$usersTableName}.nickname desc")->addRule('firstname', 'asc', "{$usersTableName}.firstname asc", "{$usersTableName}.firstname desc")->addRule('lastname', 'asc', "{$usersTableName}.lastname asc", "{$usersTableName}.lastname desc")->setDefaultRule('name');
     return $sorting;
 }
예제 #4
0
 public function getSortingInstance($currentRule, $currentOrder)
 {
     require_once 'Sitengine/Grid/Sorting.php';
     $sorting = new Sitengine_Grid_Sorting($currentRule, $currentOrder);
     $sorting->addRule('cdate', 'desc', "{$this->_name}.cdate asc", "{$this->_name}.cdate desc")->addRule('mdate', 'desc', "{$this->_name}.mdate asc", "{$this->_name}.mdate desc")->addRule('title', 'asc', "title asc", "title desc")->setDefaultRule('title');
     return $sorting;
 }
예제 #5
0
 public function getSortingInstance($currentRule, $currentOrder)
 {
     $transcripts = $this->getTranscripts();
     $transcripts->setLanguage($this->_transcript);
     $index = $transcripts->getIndex();
     require_once 'Sitengine/Grid/Sorting.php';
     $sorting = new Sitengine_Grid_Sorting($currentRule, $currentOrder);
     $sorting->addRule('cdate', 'desc', "{$this->_name}.cdate asc", "{$this->_name}.cdate desc")->addRule('mdate', 'desc', "{$this->_name}.mdate asc", "{$this->_name}.mdate desc")->addRule('publish', 'desc', "{$this->_name}.publish asc", "{$this->_name}.publish desc")->addRule('slug', 'desc', "{$this->_name}.slug asc", "{$this->_name}.slug desc")->addRule('title', 'asc', "titleLang{$index} asc", "titleLang{$index} desc")->setDefaultRule('title');
     return $sorting;
 }
예제 #6
0
 public function getSortingInstance()
 {
     require_once 'Sitengine/Grid/Sorting.php';
     $sorting = new Sitengine_Grid_Sorting($this->_controller->getRequest()->get(Sitengine_Env::PARAM_SORT), $this->_controller->getRequest()->get(Sitengine_Env::PARAM_ORDER));
     $sorting->addRule('locked', 'desc', 'locked asc', 'locked desc');
     $sorting->addRule('enabled', 'desc', 'enabled asc', 'enabled desc');
     $sorting->addRule('cdate', 'desc', 'cdate asc', 'cdate desc');
     $sorting->addRule('mdate', 'desc', 'mdate asc', 'mdate desc');
     $sorting->addRule('keyword', 'asc', 'keyword asc', 'keyword desc');
     $sorting->addRule('type', 'asc', 'type asc, keyword asc', 'type desc, keyword desc');
     #$sorting->addRule('title', 'asc', 'titleLang0 asc', 'titleLang0 desc');
     $sorting->setDefaultRule('type');
     return $sorting;
 }