@@ 506-526 (lines=21) @@ | ||
503 | * @return EE_Form_Input_Base |
|
504 | * @throws EE_Error |
|
505 | */ |
|
506 | public function get_input($name, $require_construction_to_be_finalized = true) |
|
507 | { |
|
508 | $subsection = $this->get_subsection( |
|
509 | $name, |
|
510 | $require_construction_to_be_finalized |
|
511 | ); |
|
512 | if (! $subsection instanceof EE_Form_Input_Base) { |
|
513 | throw new EE_Error( |
|
514 | sprintf( |
|
515 | esc_html__( |
|
516 | "Subsection '%s' is not an instanceof EE_Form_Input_Base on form '%s'. It is a '%s'", |
|
517 | 'event_espresso' |
|
518 | ), |
|
519 | $name, |
|
520 | get_class($this), |
|
521 | $subsection ? get_class($subsection) : esc_html__('NULL', 'event_espresso') |
|
522 | ) |
|
523 | ); |
|
524 | } |
|
525 | return $subsection; |
|
526 | } |
|
527 | ||
528 | ||
529 | /** |
@@ 5553-5569 (lines=17) @@ | ||
5550 | * @throws EE_Error |
|
5551 | * @return mixed whatever the plugin which calls add_filter decides |
|
5552 | */ |
|
5553 | public function __call($methodName, $args) |
|
5554 | { |
|
5555 | $className = get_class($this); |
|
5556 | $tagName = "FHEE__{$className}__{$methodName}"; |
|
5557 | if (! has_filter($tagName)) { |
|
5558 | throw new EE_Error( |
|
5559 | sprintf( |
|
5560 | __( |
|
5561 | 'Method %1$s on model %2$s does not exist! You can create one with the following code in functions.php or in a plugin: %4$s function my_callback(%4$s \$previousReturnValue, EEM_Base \$object\ $argsArray=NULL ){%4$s /*function body*/%4$s return \$whatever;%4$s }%4$s add_filter( \'%3$s\', \'my_callback\', 10, 3 );', |
|
5562 | 'event_espresso' |
|
5563 | ), |
|
5564 | $methodName, |
|
5565 | $className, |
|
5566 | $tagName, |
|
5567 | '<br />' |
|
5568 | ) |
|
5569 | ); |
|
5570 | } |
|
5571 | return apply_filters($tagName, null, $this, $args); |
|
5572 | } |