Beispiel #1
0
 /**
  * Get the toolbar to render.
  *
  * @return  RToolbar
  */
 public function getToolbar()
 {
     $group = new RToolbarButtonGroup();
     $save = RToolbarBuilder::createSaveButton('team.apply');
     $saveAndClose = RToolbarBuilder::createSaveAndCloseButton('team.save');
     $saveAndNew = RToolbarBuilder::createSaveAndNewButton('team.save2new');
     $save2Copy = RToolbarBuilder::createSaveAsCopyButton('team.save2copy');
     $group->addButton($save)->addButton($saveAndClose)->addButton($saveAndNew)->addButton($save2Copy);
     if (empty($this->item->id)) {
         $cancel = RToolbarBuilder::createCancelButton('team.cancel');
     } else {
         $cancel = RToolbarBuilder::createCloseButton('team.cancel');
     }
     $group->addButton($cancel);
     $toolbar = new RToolbar();
     $toolbar->addGroup($group);
     return $toolbar;
 }