Exemplo n.º 1
0
 public function __construct($request, $params, $files)
 {
     parent::__construct($request, $params, $files, array(GenericControllerBase::CRUD_CREATE => GenericControllerBase::CRUD_READ));
     $procedure = new ControllerConfigModel(new ProcedureModel(), "Procedure");
     $procedure->configureList(null, null, null, "StartDateTime");
     $procedure->configureCrud(array("EndDateTime" => FormatHelper::getInstance()->dateTimeFromString("now"), "StartDateTime" => FormatHelper::getInstance()->dateTimeFromString("now - 1 hour")));
     $milestone = new ControllerConfigModel(new MilestoneModel(), "Milestone");
     $procedure->addOneNParent($milestone);
     $this->addControllerConfig($procedure);
 }
Exemplo n.º 2
0
 /**
  * Methode zum Anzeigen des Contents.
  *
  * @return String Content der Applikation.
  */
 public function Display()
 {
     if (count($this->params) > 0) {
         if ($this->params[0] == "active") {
             $view = new GenericView("CustomersController");
             $view->assign("customers", CustomerDatabaseService::getInstance()->getActive());
             return $this->returnView($view);
         }
     }
     return parent::Display();
 }
Exemplo n.º 3
0
 public function __construct($request, $params, $files)
 {
     parent::__construct($request, $params, $files, array(GenericControllerBase::CRUD_CREATE => GenericControllerBase::CRUD_UPDATE));
     $this->addMenuItem(new MenuItem("active", ""));
     $this->addMenuItem(new MenuItem("archived", "archived"));
     $milestone = new ControllerConfigModel(new MilestoneModel(), "Milestone");
     $milestone->configureList(null, null, null, "StartDate DESC");
     $milestone->configureCrud(array("StartDate" => FormatHelper::getInstance()->dateFromString("today")));
     $project = new ControllerConfigModel(new ProjectModel(), "Project");
     $milestone->addOneNParent($project);
     $procedure = new ControllerConfigModel(new ProcedureModel(), "Procedure");
     $milestone->addOneNChild($procedure);
     $this->addControllerConfig($milestone);
 }
Exemplo n.º 4
0
 public function Display($customParams = null)
 {
     if (is_array($customParams)) {
         $params = $customParams;
     } else {
         $params = $this->params;
     }
     if (count($params) > 0) {
         if ($params[0] == "archived") {
             $this->getEditObjects()[0]->configureList(null, null, array("IsArchived" => true));
             $params = array();
         }
         if ($params[0] == "completed") {
             $this->getEditObjects()[0]->configureList(null, null, array("IsCompleted" => true));
             $params = array();
         }
     }
     return parent::DisplayExtended($params);
 }