Example #1
0
 /**
  * Constructs a new editor form
  * @param string $action URL where this form will point to
  * @param zibo\library\filesystem\File $path File to edit or to create a new file, the directory of the new file
  * @return null
  */
 public function __construct($action, File $path = null, $name = null, $content = null)
 {
     parent::__construct($action, self::NAME, self::TRANSLATION_SUBMIT, $path);
     $fieldFactory = FieldFactory::getInstance();
     $contentField = $fieldFactory->createField(FieldFactory::TYPE_TEXT, self::FIELD_CONTENT, $content);
     $this->addField($contentField);
     $this->setValue(self::FIELD_NAME, $name);
 }
Example #2
0
 /**
  * Constructs a new form
  * @param string $action URL where this form will point to
  * @param zibo\library\filesystem\File $path
  * @return null
  */
 public function __construct($action, File $path)
 {
     parent::__construct($action, self::NAME, self::TRANSLATION_SUBMIT, $path);
     $this->setValue(self::FIELD_NAME, $path->getName());
 }
 /**
  * Constructs a new form
  * @param string $action URL where this form will point to
  * @param zibo\library\filesystem\File $path Path for the new directory
  * @return null
  */
 public function __construct($action, File $path = null)
 {
     parent::__construct($action, self::NAME, self::TRANSLATION_SUBMIT, $path);
 }