Exemplo n.º 1
0
 /**
  * Construct this form
  * @param string $action url where this form will point to
  * @param joppa\model\NodeSettings the node settings which this form represents
  */
 public function __construct($action, NodeSettings $nodeSettings)
 {
     parent::__construct($action, self::NAME, self::TRANSLATION_SAVE);
     $this->nodeSettings = $nodeSettings;
     $factory = FieldFactory::getInstance();
     $this->addField($factory->createField(FieldFactory::TYPE_HIDDEN, self::FIELD_ID));
     $this->addField($factory->createField(FieldFactory::TYPE_TEXT, self::FIELD_SETTINGS));
     $this->setValue(self::FIELD_ID, $this->nodeSettings->getNode()->id);
     $this->setValue(self::FIELD_SETTINGS, $this->nodeSettings->getIniString());
 }