/** * @param $table_column * @param $nice_name * @param $nullable * @param null $default_value * @param null $timezone * @param null $date_format * @param null $time_format * @param null $pretty_date_format * @param null $pretty_time_format */ public function __construct($table_column, $nice_name, $nullable, $default_value, $timezone = NULL, $date_format = NULL, $time_format = NULL, $pretty_date_format = NULL, $pretty_time_format = NULL) { parent::__construct($table_column, $nice_name, $nullable, $default_value); $this->_date_format = empty($date_format) ? get_option('date_format') : $date_format; $this->_date_format = EE_Base_Class::fix_date_format_for_use_with_strtotime($this->_date_format); $this->_time_format = empty($time_format) ? get_option('time_format') : $time_format; $this->set_timezone($timezone); $this->_pretty_date_format = empty($pretty_date_format) ? get_option('date_format') : $pretty_date_format; $this->_pretty_date_format = EE_Base_Class::fix_date_format_for_use_with_strtotime($this->_pretty_date_format); $this->_pretty_time_format = empty($pretty_time_format) ? get_option('time_format') : $pretty_time_format; }
/** * @param string $table_column * @param string $nice_name * @param bool $nullable * @param string $default_value * @param string $timezone_string * @param string $date_format * @param string $time_format * @param string $pretty_date_format * @param string $pretty_time_format */ public function __construct($table_column, $nice_name, $nullable, $default_value, $timezone_string = '', $date_format = '', $time_format = '', $pretty_date_format = '', $pretty_time_format = '') { $this->_date_format = !empty($date_format) ? $date_format : get_option('date_format'); $this->_time_format = !empty($time_format) ? $time_format : get_option('time_format'); $this->_pretty_date_format = !empty($pretty_date_format) ? $pretty_date_format : get_option('date_format'); $this->_pretty_time_format = !empty($pretty_time_format) ? $pretty_time_format : get_option('time_format'); parent::__construct($table_column, $nice_name, $nullable, $default_value); EE_Registry::instance()->load_helper('DTT_Helper'); $this->set_timezone($timezone_string); }
/** * * @param string $table_column name fo column for field * @param string $nicename should eb internationalized with __('blah','event_espresso') * @param boolean $nullable * @param mixed $default_value if this is a integer field, it shoudl be an int. if it's a string field, it shoul dbe a string * @param string $model_name eg 'Event','Answer','Term', etc. Basically its the model class's name without the "EEM_" */ function __construct($table_column, $nicename, $nullable, $default_value, $model_name) { $this->_model_name = $model_name; parent::__construct($table_column, $nicename, $nullable, $default_value); }