示例#1
0
 public function form()
 {
     $data['page'] = Page::getPage(Config::get('contact::page-slug'));
     $data['address'] = $this->model->getOne();
     $this->theme->setTitle($data['page']->title);
     $this->theme->setKeywords($data['page']->keyword);
     $this->theme->setDescription($data['page']->description);
     return $this->theme->of('contact::public.contact', $data)->render();
 }
示例#2
0
 public function decode(array &$routeData, EntityInterface $item)
 {
     if (isset($routeData['id'])) {
         $model = new Model\Pages();
         $item = $model->find((int) $routeData['id']);
         if ($item) {
             $routeData['alias'] = str_slug($item['name']);
             return;
         }
     }
     $item->setRoute(\null);
     $routeData = [];
 }