Esempio n. 1
0
 public function executeSort(sfWebRequest $request)
 {
     // Setup App
     static::setup($request);
     $this->getResponse()->setContentType('text/plain');
     $response = Xtras::sort($request);
     if (is_string($response) && $response == "reload") {
         return $this->renderText($response);
     } else {
         return $this->renderPartial(sfConfig::get("tbody", 'global/tbody'), array('fields' => array('labels' => sfConfig::get('fields_labels', array()), 'names' => sfConfig::get('fields_names', array()), 'sorts' => sfConfig::get('fields_sorts', array()), 'xtras' => sfConfig::get('fields_xtras', array())), 'actions' => array('edit' => sfConfig::get('action_edit'), 'delete' => sfConfig::get('action_delete'), 'new' => sfConfig::get('action_new')), 'itens' => $response->getResults(), 'lastId' => $this->getUser()->getAttribute(sfConfig::get('last_edited'))));
     }
 }