| @@ 626-634 (lines=9) @@ | ||
| 623 | if (! $generator_object) { |
|
| 624 | continue; |
|
| 625 | } |
|
| 626 | if (! $generator_object instanceof EE_Restriction_Generator_Base) { |
|
| 627 | throw new EE_Error( |
|
| 628 | sprintf( |
|
| 629 | __('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.', |
|
| 630 | 'event_espresso'), |
|
| 631 | $context, |
|
| 632 | $this->get_this_model_name() |
|
| 633 | ) |
|
| 634 | ); |
|
| 635 | } |
|
| 636 | $action = $this->cap_action_for_context($context); |
|
| 637 | if (! $generator_object->construction_finalized()) { |
|
| @@ 2664-2666 (lines=3) @@ | ||
| 2661 | $field_with_model_name = $field; |
|
| 2662 | } |
|
| 2663 | } |
|
| 2664 | if (! isset($field_with_model_name) || ! $field_with_model_name) { |
|
| 2665 | throw new EE_Error(sprintf(__("There is no EE_Any_Foreign_Model_Name field on model %s", "event_espresso"), |
|
| 2666 | $this->get_this_model_name())); |
|
| 2667 | } |
|
| 2668 | return $field_with_model_name; |
|
| 2669 | } |
|
| @@ 4804-4806 (lines=3) @@ | ||
| 4801 | } |
|
| 4802 | } |
|
| 4803 | $classInstance = $this->instantiate_class_from_array_or_object($row); |
|
| 4804 | if (! $classInstance) { |
|
| 4805 | throw new EE_Error( |
|
| 4806 | sprintf( |
|
| 4807 | __('Could not create instance of class %s from row %s', 'event_espresso'), |
|
| 4808 | $this->get_this_model_name(), |
|
| 4809 | http_build_query($row) |
|