public function linkSimple($label, $path, $image = null) { $url = \Meta\Builder::replaceURL(\Meta\Builder::replaceOutput($this->row, $path)); $label = \Meta\Builder::replaceOutput($this->row, $label); $link = render('builder-link.php', array('url' => $url, 'label' => $label, 'img' => $image)); return $link; }
public function checkErrors() { // check for the linked frame page if ($this->linkedPage) { $pages = \Meta\Builder::read('pages'); if (!isset($pages[$this->linkedPage])) { throw new \Exception(t('The page defined as sub-frame `' . $this->linkedPage . '` not exists')); } else { if ($pages[$this->linkedPage]['pageType'] != 'frame') { throw new \Exception(t('The associated page frame (page ' . $this->linkedPage . ') not has been defined of type FRAME.')); } } } // test for urls and substitutions \Meta\Builder::replaceURL($this->extraArgs); parent::checkErrors(); }
public static function replaceOutput(array $row, $html) { // aplica replacements of values foreach ($row as $col => $val) { $html = str_replace("[{$col}]", $row[$col], $html); } $html = \Meta\Builder::replaceURL($html); return $html; }
protected function redirectToUrl($url) { redirect(\Meta\Builder::replaceURL($url)); return true; }