protected function find() { $this->template->formAction = $this->url->getActionURL(__FUNCTION__); if ($this->request->error) { $this->template->message = DOMFactory::getDiv($this->request->error)->addClass('error'); } $this->template->name = $this->values->name; $this->template->show($this->url->getActionPath()); $this->wall(); }
private function prepareRequest() { if ($this->request->error) { foreach ($this->request->getValues() as $key => $value) { $this->template->{$key} = $value; } $this->template->message = DOMFactory::getDiv($this->request->error)->addClass('error'); } if ($this->request->success) { $this->template->message = DOMFactory::getDiv($this->request->success)->addClass('success'); } }
private function makeComment($comment) { $avatar = $this->prepareAvatar($comment->getUser()); $author = DOMFactory::getDiv($avatar)->addId('comment-avatar'); $link = $this->url->getCustomActionURL('profile', $comment->getLogin()); $nameLink = DOMFactory::getLink($link, $comment->getName()); $content = DOMFactory::getDiv($nameLink)->addClass('name'); $content .= DOMFactory::getDiv($comment->getContent()); $content .= DOMFactory::getDiv('Added on: ' . Date::convert($comment->getDate(), 'j F Y'))->addClass('date'); $author .= DOMFactory::getDiv($content)->addId('comment-author'); $section = DOMFactory::getDiv($author)->addId('comment'); $section .= DOMFactory::getDiv()->addClass('separator'); return $section; }
protected function show() { if ($this->values->error) { $this->template->message = DOMFactory::getDiv($this->values->error)->addClass('error'); } $commentView = new CommentView(); $commentView->produceComments(); $this->template->type = $this->url->getController(); $this->template->id = $this->url->getParameter(0); $this->template->sourceId = $this->values->video->getSourceId(); $this->template->title = $this->values->video->getTitle(); $this->template->description = $this->values->video->getDescription(); $this->template->duration = $this->values->video->getLength(); $this->template->date = Date::convert($this->values->video->getDate(), 'j F Y'); $this->template->videoObject = $this->template->getTemplate('video', $this->values->video->getType()); $this->template->link = $this->url->getURL(); $link = $this->url->getCustomActionURL('profile', $this->values->video->getLogin()); $this->template->username = DOMFactory::getLink($link, $this->values->video->getUsername()); $this->template->show($this->url->getActionPath()); }
public function index() { $lipsum = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ornare sollicitudin elit, vitae vestibulum nisl laoreet vel.'; $this->template->index = DOMFactory::getDiv($lipsum); $this->template->show($this->url->getActionPath('index')); }
private function prepareWelcomeMessage() { $text = 'Simlandia helps you connect and share with the people in your life.'; $welcomeMessage = DOMFactory::getDiv($text)->addClass('bold'); $this->template->welcomeMessage = DOMFactory::getLi($welcomeMessage); }