/**
  * Initializes a display type with properties
  * @param FALSE|C_Displayed_Gallery_Mapper $mapper
  * @param array|stdClass|C_Displayed_Gallery $properties
  * @param FALSE|string|array $context
  */
 function initialize($mapper = FALSE, $properties = array())
 {
     if (!$mapper) {
         $mapper = $this->get_registry()->get_utility($this->_mapper_interface);
     }
     parent::initialize($mapper, $properties);
 }
Esempio n. 2
0
 /**
  * Initializes a display type with properties
  * @param FALSE|C_Displayed_Gallery_Mapper $mapper
  * @param array|stdClass|C_Displayed_Gallery $properties
  * @param FALSE|string|array $context
  */
 function initialize($properties = array(), $mapper = FALSE, $context = FALSE)
 {
     if (!$mapper) {
         $mapper = $this->get_registry()->get_utility($this->_mapper_interface);
     }
     parent::initialize($mapper, $properties);
     $this->select_random_variation();
 }
Esempio n. 3
0
 /**
  * Instantiates a new model
  * @param array|stdClass $properties
  * @param C_DataMapper $mapper
  * @param string $context
  */
 function initialize($properties = FALSE, $mapper = FALSE)
 {
     // Get the mapper is not specified
     if (!$mapper) {
         $mapper = $this->get_registry()->get_utility($this->_mapper_interface);
     }
     parent::initialize($mapper, $properties);
 }
 /**
  * Creates an instance of a displayed gallery source
  * @param type $mapper
  * @param type $properties
  */
 function initialize($properties = array(), $mapper = FALSE, $context = FALSE)
 {
     // If no mapper was specified, then get the mapper
     if (!$mapper) {
         $mapper = $this->get_registry()->get_utility($this->_mapper_interface);
     }
     // Construct the model
     parent::initialize($mapper, $properties);
 }
 function initialize($properties = array(), $mapper = FALSE, $context = FALSE)
 {
     // If no mapper was specified, then get the mapper
     if (!$mapper) {
         $mapper = $this->get_registry()->get_utility($this->_mapper_interface);
     }
     // Construct the model
     parent::initialize($mapper, $properties);
     if (is_object($properties) && isset($properties->cart)) {
         $this->_cart = new C_NextGen_Pro_Cart($properties->cart);
     } elseif (is_array($properties) && isset($properties['cart'])) {
         $this->_cart = new C_NextGen_Pro_Cart($properties['cart']);
     }
 }