Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
/**
4
 * Article form.
5
 *
6
 * @package    form
7
 * @subpackage article
8
 * @version    SVN: $Id: ArticleForm.class.php 14010 2008-12-13 14:27:57Z Kris.Wallsmith $
9
 */
10
class ArticleForm extends BaseArticleForm
11
{
12
  public function configure()
13
  {
14
    if ($category = $this->getObject()->getCategory())
15
    {
16
      $this->embedForm('category', new CategoryForm($this->getObject()->getCategory()));
17
    }
18
 
19
    if ($this->getOption('with_attachment'))
20
    {
21
      $attachment = new Attachment();
22
      $attachment->setArticle($this->object);
23
 
24
      $attachmentForm = new AttachmentForm($attachment);
25
      unset($attachmentForm['article_id']);
26
 
27
      $this->embedForm('attachment', $attachmentForm);
28
    }
29
  }
30
}