Admin::listModel PHP Метод

listModel() публичный Метод

Lists all the rows returned from the search in a table.
public listModel ( $buttons = true )
    public function listModel($buttons = true)
    {
        if (!$this->model) {
            throw new CHttpException(500, 'Nothing to list');
        }
        $order = $this->request->getParam('d');
        if ($order == 0) {
            $this->displayOrder = 1;
        }
        $this->assetManager->registerScriptFile('js/oeadmin/list.js');
        $this->audit('list');
        $this->pagination = $this->getSearch()->initPagination();
        $this->render($this->listTemplate, array('admin' => $this, 'displayOrder' => $this->displayOrder, 'buttons' => $buttons));
    }

Usage Example

Пример #1
0
 /**
  * Render the basic drug set admin page.
  */
 public function actionDrugSets()
 {
     $admin = new Admin(DrugSet::model(), $this);
     $admin->setListFields(array('id', 'name', 'subspecialty.name', 'active'));
     $admin->searchAll();
     $admin->getSearch()->setItemsPerPage($this->itemsPerPage);
     $admin->listModel();
 }
All Usage Examples Of Admin::listModel