| @@ 411-413 (lines=3) @@ | ||
| 408 | { |
|
| 409 | // validate context |
|
| 410 | // valid context? |
|
| 411 | if (! isset($this->_contexts[ $context ])) { |
|
| 412 | throw new EE_Error( |
|
| 413 | sprintf( |
|
| 414 | __('The context %s is not a valid context for %s.', 'event_espresso'), |
|
| 415 | $context, |
|
| 416 | get_class($this) |
|
| @@ 467-475 (lines=9) @@ | ||
| 464 | public function get_data_for_context($context, EE_Registration $registration, $id = 0) |
|
| 465 | { |
|
| 466 | // valid context? |
|
| 467 | if (! isset($this->_contexts[ $context ])) { |
|
| 468 | throw new EE_Error( |
|
| 469 | sprintf( |
|
| 470 | __('The context %s is not a valid context for %s.', 'event_espresso'), |
|
| 471 | $context, |
|
| 472 | get_class($this) |
|
| 473 | ) |
|
| 474 | ); |
|
| 475 | } |
|
| 476 | // get data and apply global and class specific filters on it. |
|
| 477 | $data = apply_filters( |
|
| 478 | 'FHEE__EE_message_type__get_data_for_context__data', |
|
| @@ 5001-5003 (lines=3) @@ | ||
| 4998 | break; |
|
| 4999 | } |
|
| 5000 | } |
|
| 5001 | if (! isset($this->_cache_foreign_key_to_fields[ $model_name ])) { |
|
| 5002 | throw new EE_Error(sprintf(__( |
|
| 5003 | "There is no foreign key field pointing to model %s on model %s", |
|
| 5004 | 'event_espresso' |
|
| 5005 | ), $model_name, get_class($this))); |
|
| 5006 | } |
|