Beispiel #1
0
 private function fillFormBy(Page $page)
 {
     $this['pageForm']['url']->setDefaultValue($page->getUrlPath());
     $this['pageForm']['publishedAt']->setDefaultValue($page->getTitle());
     if ($page->getPublishedAt() !== null) {
         $this['pageForm']['publishedAt']->setDefaultValue($page->getPublishedAt()->format('j.n.Y H:i'));
     }
     $this['pageForm']['title']->setDefaultValue($page->getTitle());
     $this['pageForm']['intro']->setDefaultValue($page->getIntro());
     $this['pageForm']['text']->setDefaultValue($page->getText());
     $this['pageForm']['allowedComments']->setDefaultValue($page->getAllowedComments());
     $this['pageForm']['description']->setDefaultValue($page->getMetaDescription());
     $this['pageForm']['keywords']->setDefaultValue($page->getMetaKeywords());
     $this['pageForm']['lang']->setDefaultValue($page->getLocaleName());
 }