| @@ 631-639 (lines=9) @@ | ||
| 628 | if (! $generator_object) { |
|
| 629 | continue; |
|
| 630 | } |
|
| 631 | if (! $generator_object instanceof EE_Restriction_Generator_Base) { |
|
| 632 | throw new EE_Error( |
|
| 633 | sprintf( |
|
| 634 | __('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.', |
|
| 635 | 'event_espresso'), |
|
| 636 | $context, |
|
| 637 | $this->get_this_model_name() |
|
| 638 | ) |
|
| 639 | ); |
|
| 640 | } |
|
| 641 | $action = $this->cap_action_for_context($context); |
|
| 642 | if (! $generator_object->construction_finalized()) { |
|
| @@ 2785-2787 (lines=3) @@ | ||
| 2782 | $field_with_model_name = $field; |
|
| 2783 | } |
|
| 2784 | } |
|
| 2785 | if (! isset($field_with_model_name) || ! $field_with_model_name) { |
|
| 2786 | throw new EE_Error(sprintf(__("There is no EE_Any_Foreign_Model_Name field on model %s", "event_espresso"), |
|
| 2787 | $this->get_this_model_name())); |
|
| 2788 | } |
|
| 2789 | return $field_with_model_name; |
|
| 2790 | } |
|
| @@ 5052-5054 (lines=3) @@ | ||
| 5049 | } |
|
| 5050 | } |
|
| 5051 | $classInstance = $this->instantiate_class_from_array_or_object($row); |
|
| 5052 | if (! $classInstance) { |
|
| 5053 | throw new EE_Error( |
|
| 5054 | sprintf( |
|
| 5055 | __('Could not create instance of class %s from row %s', 'event_espresso'), |
|
| 5056 | $this->get_this_model_name(), |
|
| 5057 | http_build_query($row) |
|