| @@ 627-635 (lines=9) @@ | ||
| 624 | if (! $generator_object) { |
|
| 625 | continue; |
|
| 626 | } |
|
| 627 | if (! $generator_object instanceof EE_Restriction_Generator_Base) { |
|
| 628 | throw new EE_Error( |
|
| 629 | sprintf( |
|
| 630 | __('Index "%1$s" in the model %2$s\'s _cap_restriction_generators is not a child of EE_Restriction_Generator_Base. It should be that or NULL.', |
|
| 631 | 'event_espresso'), |
|
| 632 | $context, |
|
| 633 | $this->get_this_model_name() |
|
| 634 | ) |
|
| 635 | ); |
|
| 636 | } |
|
| 637 | $action = $this->cap_action_for_context($context); |
|
| 638 | if (! $generator_object->construction_finalized()) { |
|
| @@ 2768-2770 (lines=3) @@ | ||
| 2765 | $field_with_model_name = $field; |
|
| 2766 | } |
|
| 2767 | } |
|
| 2768 | if (! isset($field_with_model_name) || ! $field_with_model_name) { |
|
| 2769 | throw new EE_Error(sprintf(__("There is no EE_Any_Foreign_Model_Name field on model %s", "event_espresso"), |
|
| 2770 | $this->get_this_model_name())); |
|
| 2771 | } |
|
| 2772 | return $field_with_model_name; |
|
| 2773 | } |
|
| @@ 4942-4944 (lines=3) @@ | ||
| 4939 | } |
|
| 4940 | } |
|
| 4941 | $classInstance = $this->instantiate_class_from_array_or_object($row); |
|
| 4942 | if (! $classInstance) { |
|
| 4943 | throw new EE_Error( |
|
| 4944 | sprintf( |
|
| 4945 | __('Could not create instance of class %s from row %s', 'event_espresso'), |
|
| 4946 | $this->get_this_model_name(), |
|
| 4947 | http_build_query($row) |
|