public function JobItemCart::__construct in Translation Management Tool 8
Set up a new JobItemCart instance.
Will load the cart from the session or initialize a new one if nothing has been stored yet.
File
- src/
JobItemCart.php, line 34
Class
- JobItemCart
- Represents a job item cart.
Namespace
Drupal\tmgmtCode
public function __construct() {
if (!isset($_SESSION[$this->session_key])) {
$_SESSION[$this->session_key] = array();
}
$this->cart =& $_SESSION[$this->session_key];
}