Пример #1
0
 private function generateItemForm()
 {
     $hasPage = isset($this->page);
     $title = $hasPage ? $this->page->getTitle() : '';
     $slug = $hasPage ? $this->page->getSlug() : '';
     $bodyContent = $hasPage ? $this->page->getBody() : '';
     return \Primitive\Tools::render($this->templates . 'form.html', ['titleId' => self::$title, 'titleContent' => $title, 'slugId' => self::$slug, 'slugContent' => $slug, 'textAreaId' => self::$body, 'textAreaContent' => $bodyContent, 'submitId' => self::$updatePage]);
 }
Пример #2
0
 private function generateNavigation()
 {
     $logoutButton = \Primitive\Tools::render($this->templates . 'logoutButton.html', ['buttonName' => self::$logout]);
     return $this->links . $logoutButton;
 }
Пример #3
0
 public function render()
 {
     $username = $this->getRequestUserName();
     $form = \Primitive\Tools::render($this->templates . 'loginForm.html', ['id' => self::$messageId, 'keepInput' => self::$keep, 'loginInput' => self::$login, 'message' => $this->message, 'passwordInput' => self::$password, 'username' => $username, 'usernameInput' => self::$name]);
     return $form . $this->dateTimeView->render();
 }