Example #1
0
 /**
  * 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);
 }
Example #2
0
				
				{!! $page !!}

			</div>
			<div class="row">
				<div class="col-lg-12" style="background-color: #F3F3F3;">
					<span style="margin-left: 315px;">&copy; 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
Example #3
0
 /**
  * Holds subdomain if used. Will select first item in the url exploded on the dot (.)
  * @return string Get current subdomain, or FALSE if not isset
  */
 public function subdomain()
 {
     $urlSegments = parse_url(URL::base());
     $urlHostSegments = explode('.', $urlSegments['host']);
     return (count($urlHostSegments) > 2 and $urlHostSegments[0] !== 'www') ? $urlHostSegments[0] : false;
 }
Example #4
0
 /**
  * Creates a image link.
  *
  * @param   string   file name
  * @param   array    default attributes
  * @return  string
  */
 public static function image($file, array $attributes = NULL)
 {
     if (strpos($file, '://') === FALSE) {
         // Add the base URL
         $file = URL::base(FALSE) . $file;
     }
     // Add the image link
     $attributes['src'] = $file;
     return '<img' . HTML::attributes($attributes) . ' />';
 }
Example #5
0
 /**
  * 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);
 }