<?php

namespace Engine\Form\Container;

/**
 * The main form container. This will hold multiple input elements in it
 * @author Lucian
 */
class Tabs_IndividualTab extends \Engine\Form\Container\GeneralAbstract
{
	public $class = "tabs-tab";

	private $url = "";

	/**
	 * Determine the url to be used when this tab is accessed. It uses $R['tab'] basically
	 */
	public function getUrl()
	{
		if(!$this->url){
			global $G;
			$qArr = $G;

			$qArr['tab'] = $this->getId();

			$this->url = "?".http_build_query($qArr);
		}

		return $this->url;
	}

	/**
	 * Sets the URL to a specific value
	 * @param $url
	 */
	public function setUrl($url)
	{
		$this->url = $url; return $this;
	}

}
