Esempio n. 1
0
 public function export($fxml)
 {
     $node = $fxml->addChild('control');
     $node->addAttribute('custom-template', $this->getPageTypeComposerFormLayoutSetControlCustomTemplate());
     if ($this->isPageTypeComposerFormLayoutSetControlRequired()) {
         $node->addAttribute('required', true);
     }
     $node->addAttribute('custom-label', $this->getPageTypeComposerFormLayoutSetControlCustomLabel());
     $node->addAttribute('description', $this->getPageTypeComposerFormLayoutSetControlDescription());
     $db = Loader::db();
     $cnt = $db->GetOne('select count(*) from PageTypeComposerOutputControls where ptComposerFormLayoutSetControlID = ?', array($this->ptComposerFormLayoutSetControlID));
     if ($cnt > 0) {
         $ptComposerControlTemporaryID = Loader::helper('validation/identifier')->getString(8);
         ContentExporter::addPageTypeComposerOutputControlID($this, $ptComposerControlTemporaryID);
         $node->addAttribute('output-control-id', $ptComposerControlTemporaryID);
     }
     $typeo = $this->getPageTypeComposerControlTypeObject();
     $node->addAttribute('type', $typeo->getPageTypeComposerControlTypeHandle());
     $to = $this->getPageTypeComposerControlObject();
     $to->export($node);
 }
 public function export($fxml)
 {
     $node = $fxml->addChild('control');
     $node->addAttribute('custom-template', $this->getPageTypeComposerFormLayoutSetControlCustomTemplate());
     if ($this->isPageTypeComposerFormLayoutSetControlRequired()) {
         $node->addAttribute('required', true);
     }
     $node->addAttribute('custom-label', $this->getPageTypeComposerFormLayoutSetControlCustomLabel());
     $node->addAttribute('description', $this->getPageTypeComposerFormLayoutSetControlDescription());
     $app = Application::getFacadeApplication();
     $db = $app->make('database')->connection();
     $cnt = $db->fetchColumn('select count(*) from PageTypeComposerOutputControls where ptComposerFormLayoutSetControlID = ?', [$this->ptComposerFormLayoutSetControlID]);
     if ($cnt > 0) {
         $ptComposerControlTemporaryID = $app->make('helper/validation/identifier')->getString(8);
         ContentExporter::addPageTypeComposerOutputControlID($this, $ptComposerControlTemporaryID);
         $node->addAttribute('output-control-id', $ptComposerControlTemporaryID);
     }
     $typeo = $this->getPageTypeComposerControlTypeObject();
     $node->addAttribute('type', $typeo->getPageTypeComposerControlTypeHandle());
     $to = $this->getPageTypeComposerControlObject();
     $to->export($node);
 }