/** * Generate an html link with a query string * * @param array $file * @return string */ public static function link($file = array()) { if (!is_array($file['location'])) { $querystring = array('location' => $file['location'], 'name' => $file['name'], 'translate' => \Laravel\Input::get('translate')); $text = $file['name']; } else { $querystring = array('location' => $file['location']['location'], 'name' => $file['name'], 'translate' => \Laravel\Input::get('translate')); $text = $file['location']['location'] . '/' . $file['name']; } $querystring = http_build_query($querystring); return \Laravel\HTML::link('language-builder/edit?' . $querystring, $text); }
/** * Generate a secure hyperlink * * @param string $dest The file relative to your public directory * @param string $title The HTML title attribute * @param string $params Additional HTML attributes * * @return string */ public function link_secure($dest, $title, $params = '') { $attrs = array(); if (strlen(trim($params)) != 0) { parse_str($params, $attrs); } return HTML::link($dest, $title, $attrs, true); }
protected function link($page, $text, $class) { $query = '?page=' . $page . $this->appendage($this->appends); return '<li' . HTML::attributes(array('class' => $class)) . '>' . HTML::link(URI::current() . $query, $text, array(), Request::secure()) . '</li>'; }