public function readDatabaseProperties(BaseDatabaseModel $model, ViewBase $view, $excludedProps = null) { $html = ""; $props = $model->getDatabaseArray(); foreach ($props as $key => $val) { if (in_array($key, $excludedProps)) { continue; } if (str_ends_with($key, "Id") && strlen($key) > 2) { $objName = substr($key, 0, -2); $obj = $view->tryRetrieve($objName); if ($obj instanceof BaseModel) { $html .= "<p><b>" . $objName . "</b>" . $obj->getIdentification() . "</p>"; } } else { $equalHides = array("Id" => "hidden"); $endHides = array("Password", "AuthHash"); $equalVal = str_equals_with_any($key, $equalHides, true); $endVal = str_ends_with_any($key, $endHides, true); if ($equalVal === false && $endVal === false) { $html .= "<p><b>" . $key . "</b>" . $this->formatProperty($val, $key) . "</p>"; } } } return $html; }
protected function returnView(ViewBase $view) { if (is_array($this->getAdditionalViewProps())) { foreach ($this->getAdditionalViewProps() as $key => $val) { $view->assign($key, $val); } } return parent::returnView($view); }
public function __construct($title, $description, LeftMenu $leftMenu = null, TopBar $topBar = null) { parent::__construct($title, $description); $this->leftMenu = $leftMenu; $this->topBar = $topBar; }
protected function returnView(ViewBase $view) { $view->setDefaultValues($this->applicationConfig["Title"], $this->applicationConfig["Description"], $this->applicationConfig["Author"], $this->applicationConfig["AuthorUrl"]); $view->setApplicationValues($this->applicationConfig["Name"], $this->applicationConfig["Url"]); return $view->loadTemplate(); }
protected function returnView(ViewBase $view) { $view->setMenus($this->mainMenu, $this->subMenu); return $view->loadTemplate(); }