| @@ 375-381 (lines=7) @@ | ||
| 372 | * @return EE_Form_Input_Base |
|
| 373 | * @throws EE_Error |
|
| 374 | */ |
|
| 375 | public function get_input($name, $require_construction_to_be_finalized = TRUE ){ |
|
| 376 | $subsection = $this->get_subsection($name, $require_construction_to_be_finalized); |
|
| 377 | if( ! $subsection instanceof EE_Form_Input_Base){ |
|
| 378 | throw new EE_Error( |
|
| 379 | sprintf( |
|
| 380 | __( |
|
| 381 | "Subsection '%s' is not an instanceof EE_Form_Input_Base on form '%s'. It is a '%s'", |
|
| 382 | 'event_espresso' |
|
| 383 | ), |
|
| 384 | $name, |
|
| @@ 4435-4451 (lines=17) @@ | ||
| 4432 | * @throws EE_Error |
|
| 4433 | * @return mixed whatever the plugin which calls add_filter decides |
|
| 4434 | */ |
|
| 4435 | public function __call($methodName,$args){ |
|
| 4436 | $className=get_class($this); |
|
| 4437 | $tagName="FHEE__{$className}__{$methodName}"; |
|
| 4438 | if(!has_filter($tagName)){ |
|
| 4439 | throw new EE_Error( |
|
| 4440 | sprintf( |
|
| 4441 | __( '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 );', 'event_espresso' ), |
|
| 4442 | $methodName, |
|
| 4443 | $className, |
|
| 4444 | $tagName, |
|
| 4445 | '<br />' |
|
| 4446 | ) |
|
| 4447 | ); |
|
| 4448 | } |
|
| 4449 | ||
| 4450 | return apply_filters($tagName,null,$this,$args); |
|
| 4451 | } |
|
| 4452 | ||
| 4453 | ||
| 4454 | ||