protected function processPostFields($requestParams = array()) { if ($this->multipart) { return $requestParams; } else { return Url::encodePairsToString($requestParams); } }
protected function buildSigningKey() { $key = Url::encodeRFC3986(self::SECRET) . '&' . Url::encodeRFC3986($this->secret); return $key; }
public function addNext($url, $next) { return Url::build($url, array('next' => $next)); }
public function addLocationParams($params) { $this->redirect->setLocation(Url::mergeQueryParams($this->redirect->getLocation(), $params)); }
public function getLocation() { return Url::addHost($this->location); }
public function logout() { session_unset(); session_destroy(); Url::redirect('archivo/public/home'); }
/** * ฟังก์ชั่น แปลงเป็นรายการเมนู * * @param array $item แอเรย์ข้อมูลเมนู * @param boolean $arrow (optional) true=แสดงลูกศรสำหรับเมนูที่มีเมนูย่อย (default false) * @return string คืนค่า HTML ของเมนู */ public function getItem($item, $arrow = false) { $c = array(); if ($item['alias'] != '') { $c[] = $item['alias']; } elseif ($item['module'] != '') { $c[] = $item['module']; } if (isset($item['published'])) { if ($item['published'] != 1) { if (Gcms::isMember()) { if ($item['published'] == '3') { $c[] = 'hidden'; } } else { if ($item['published'] == '2') { $c[] = 'hidden'; } } } } $c = sizeof($c) == 0 ? '' : ' class="' . implode(' ', $c) . '"'; if ($item['index_id'] > 0 || $item['menu_url'] != '') { $a = $item['menu_target'] == '' ? '' : ' target=' . $item['menu_target']; $a .= $item['accesskey'] == '' ? '' : ' accesskey=' . $item['accesskey']; if ($item['index_id'] > 0) { $a .= ' href="' . \Core\Url::createUrl($item['module']) . '"'; } elseif ($item['menu_url'] != '') { $a .= ' href="' . $item['menu_url'] . '"'; } else { $a .= ' tabindex=0'; } } else { $a = ' tabindex=0'; } $b = $item['menu_tooltip'] == '' ? $item['menu_text'] : $item['menu_tooltip']; if ($b != '') { $a .= ' title="' . $b . '"'; } if ($arrow) { return '<li' . $c . '><a class=menu-arrow' . $a . '><span>' . ($item['menu_text'] == '' ? ' ' : htmlspecialchars_decode($item['menu_text'])) . '</span></a>'; } else { return '<li' . $c . '><a' . $a . '><span>' . ($item['menu_text'] == '' ? ' ' : htmlspecialchars_decode($item['menu_text'])) . '</span></a>'; } }