Ejemplo n.º 1
0
 /**
  * Get the script text
  *
  * @return string
  */
 protected function getScriptText()
 {
     $url = $this->buildCompatibleUrl();
     $entryName = $this->entry->getName();
     $link = Builder::escapeText($entryName . $url . "=");
     return "\ndeclare Value = TextLib::URLEncode(Entry.Value);\nOpenLink({$link}^Value, CMlScript::LinkType::Goto);\n";
 }
Ejemplo n.º 2
0
 /**
  * Create the hidden Entry
  *
  * @return Entry
  */
 protected function createEntry()
 {
     $entry = new Entry();
     $entry->setVisible(false)->setName($this->name);
     $this->setEntry($entry);
     return $entry;
 }
Ejemplo n.º 3
0
 public function testRenderWithAutoComplete()
 {
     $domDocument = new \DOMDocument();
     $entry = new Entry("test.auto.entry");
     $entry->clearAlign()->setName("test-get-name")->setAutoComplete(true);
     $domElement = $entry->render($domDocument);
     $domDocument->appendChild($domElement);
     $this->assertEquals("<?xml version=\"1.0\"?>\n<entry id=\"test.auto.entry\" name=\"test-get-name\" default=\"test-get-value\"/>\n", $domDocument->saveXML());
 }
Ejemplo n.º 4
0
 /**
  * Set the hidden Entry
  *
  * @api
  * @param Entry $entry Hidden Entry
  * @return static
  */
 public function setEntry(Entry $entry)
 {
     $entry->checkId();
     $this->entry = $entry;
     return $this;
 }