/** * instantiate a new price type object with blank/empty properties * * @access public * @return mixed array on success, FALSE on fail */ public function get_new_price_type() { return EE_Price_Type::new_instance(); }
/** * used by factory to create price type object. * * @since 4.3.0 * * @param array $args Incoming field values to set on the new object * * @return EE_Price_Type|false */ public function create_object($args) { $this->_special_args['PRC_ID'] = isset($args['PRC_ID']) ? $args['PRC_ID'] : 0; if (isset($args['PRC_ID'])) { unset($args['PRC_ID']); } $price_type = EE_Price_Type::new_instance($args); $price_typeID = $price_type->save(); $price_type = $this->_maybe_chained($price_type, $args); return $price_typeID ? $price_type : false; }