/** * Generates an opening HTML form tag. * * @param string $action form action * @param string $method Method GET|POST|PUT|DELETE * @param array $attributes html attributes * @return string */ public static function open($action = NULL, $method = 'POST', array $attributes = NULL) { if ($action === NULL) { // Use the current URI $action = '/' . Request::instance()->uri(); } if ($action === '') { // Use only the base URI $action = URL::base(); } elseif (strpos($action, '://') === FALSE) { // Make the URI absolute $action = URL::site($action); } // Add the form action to the attributes $attributes['action'] = $action; // Form method is always POST $attributes['method'] = 'post'; return '<form' . HTML::attributes($attributes) . '>' . PHP_EOL . static::hidden('__method', $method); }
/** * Create HTML link anchors. Note that the title is not escaped, to allow * HTML elements within links (images, etc). * * @param string URL or URI string * @param string link text * @param array HTML anchor attributes * @param string use a specific protocol * @return string */ public static function anchor($uri, $title = NULL, array $attributes = NULL, $protocol = NULL) { if ($title === NULL) { // Use the URI as the title $title = $uri; } if ($uri === '') { // Only use the base URL $uri = URL::base(FALSE, $protocol); } else { if (strpos($uri, '://') !== FALSE) { if (HTML::$windowed_urls === TRUE and empty($attributes['target'])) { // Make the link open in a new window $attributes['target'] = '_blank'; } } elseif ($uri[0] !== '#') { // Make the URI absolute for non-id anchors $uri = URL::site($uri, $protocol); } } // Add the sanitized link to the attributes $attributes['href'] = $uri; return '<a' . HTML::attributes($attributes) . '>' . $title . '</a>'; }
{!! $page !!} </div> <div class="row"> <div class="col-lg-12" style="background-color: #F3F3F3;"> <span style="margin-left: 315px;">© Stativo Framework 2015 - {{ date('Y') }}</span> </div> </div> </div> <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script src="<?php echo \Stativo\Helpers\URL::site(route('stativo.guide.media', ['file' => 'bootstrap.min.js'])); ?> "></script> <script type="text/javascript"> // SyntaxHighlighter.config.tagName='code'; // SyntaxHighlighter.defaults.gutter=false; SyntaxHighlighter.all(); $('.sidebar').animate({ scrollTop: $(".active").offset().top - 100 }, 1000); if(window.location.hash.length > 0) { $('body, html').animate({ scrollTop: $(window.location.hash.replace("#", ".")).offset().top - 45
/** * Create URL from named route * @param string $route route name * @param array $params parameters for the url * @return void */ function url($uri) { return URL::site($uri, true); }