getStatusForDropDown() public static method

Fetch the list of status, but for a dropdown.
public static getStatusForDropDown ( ) : array
return array
Example #1
0
 /**
  * Load the form.
  */
 private function loadForm()
 {
     // create form
     $this->frm = new BackendForm('filter', BackendModel::createURLForAction(), 'get');
     // values for dropdowns
     $status = BackendProfilesModel::getStatusForDropDown();
     $groups = BackendProfilesModel::getGroups();
     // add fields
     $this->frm->addText('email', $this->filter['email']);
     $this->frm->addDropdown('status', $status, $this->filter['status']);
     $this->frm->getField('status')->setDefaultElement('');
     // add a group filter if wa have groups
     if (!empty($groups)) {
         $this->frm->addDropdown('group', $groups, $this->filter['group']);
         $this->frm->getField('group')->setDefaultElement('');
     }
     // manually parse fields
     $this->frm->parse($this->tpl);
 }