core/db_models/strategies/EE_Soft_Delete_Where_Conditions.strategy.php 1 location
|
@@ 42-49 (lines=8) @@
|
| 39 |
|
* @return string |
| 40 |
|
* @throws EE_Error |
| 41 |
|
*/ |
| 42 |
|
private function deleted_field_name(){ |
| 43 |
|
$field = $this->_model->get_a_field_of_type('EE_Trashed_Flag_Field'); |
| 44 |
|
if($field){ |
| 45 |
|
return $field->get_name(); |
| 46 |
|
}else{ |
| 47 |
|
throw new EE_Error(sprintf(__('We are trying to find the deleted flag field on %s, but none was found. Are you sure there is a field of type EE_Trashed_Flag_Field in %s constructor?','event_espresso'),get_class($this),get_class($this))); |
| 48 |
|
} |
| 49 |
|
} |
| 50 |
|
} |
core/db_models/EEM_CPT_Base.model.php 1 location
|
@@ 163-170 (lines=8) @@
|
| 160 |
|
* @return string |
| 161 |
|
* @throws EE_Error |
| 162 |
|
*/ |
| 163 |
|
public function post_status_field_name() |
| 164 |
|
{ |
| 165 |
|
$field = $this->get_a_field_of_type('EE_WP_Post_Status_Field'); |
| 166 |
|
if ($field) { |
| 167 |
|
return $field->get_name(); |
| 168 |
|
} else { |
| 169 |
|
throw new EE_Error(sprintf(__('We are trying to find the post status flag field on %s, but none was found. Are you sure there is a field of type EE_Trashed_Flag_Field in %s constructor?', |
| 170 |
|
'event_espresso'), get_class($this), get_class($this))); |
| 171 |
|
} |
| 172 |
|
} |
| 173 |
|
|
core/db_models/EEM_Soft_Delete_Base.model.php 1 location
|
@@ 55-62 (lines=8) @@
|
| 52 |
|
* @return string |
| 53 |
|
* @throws EE_Error |
| 54 |
|
*/ |
| 55 |
|
public function deleted_field_name() |
| 56 |
|
{ |
| 57 |
|
$field = $this->get_a_field_of_type('EE_Trashed_Flag_Field'); |
| 58 |
|
if ($field) { |
| 59 |
|
return $field->get_name(); |
| 60 |
|
} else { |
| 61 |
|
throw new EE_Error(sprintf(__('We are trying to find the deleted flag field on %s, but none was found. Are you sure there is a field of type EE_Trashed_Flag_Field in %s constructor?', |
| 62 |
|
'event_espresso'), get_class($this), get_class($this))); |
| 63 |
|
} |
| 64 |
|
} |
| 65 |
|
|
core/db_models/EEM_Base.model.php 1 location
|
@@ 3500-3506 (lines=7) @@
|
| 3497 |
|
* @return string either ASC, asc, DESC or desc |
| 3498 |
|
* @throws EE_Error |
| 3499 |
|
*/ |
| 3500 |
|
private function _extract_order($should_be_order_string) |
| 3501 |
|
{ |
| 3502 |
|
if (in_array($should_be_order_string, $this->_allowed_order_values)) { |
| 3503 |
|
return $should_be_order_string; |
| 3504 |
|
} else { |
| 3505 |
|
throw new EE_Error(sprintf(__("While performing a query on '%s', tried to use '%s' as an order parameter. ", |
| 3506 |
|
"event_espresso"), get_class($this), $should_be_order_string)); |
| 3507 |
|
} |
| 3508 |
|
} |
| 3509 |
|
|