You are here

protected function TMGMTJobItemUICart::__construct in Translation Management Tool 7

Set up a new TMGMTJobItemUICart instance.

Will load the cart from the session or initialize a new one if nothing has been stored yet.

File

ui/includes/tmgmt_ui.cart.inc, line 40
Contains TMGMTJobItemUICart.

Class

TMGMTJobItemUICart
Represents a job item cart.

Code

protected function __construct() {
  if (!isset($_SESSION[$this->session_key])) {
    $_SESSION[$this->session_key] = array();
  }
  $this->cart =& $_SESSION[$this->session_key];
}