| @@ 4412-4428 (lines=17) @@ | ||
| 4409 | * @throws EE_Error |
|
| 4410 | * @return mixed whatever the plugin which calls add_filter decides |
|
| 4411 | */ |
|
| 4412 | public function __call($methodName,$args){ |
|
| 4413 | $className=get_class($this); |
|
| 4414 | $tagName="FHEE__{$className}__{$methodName}"; |
|
| 4415 | if(!has_filter($tagName)){ |
|
| 4416 | throw new EE_Error( |
|
| 4417 | sprintf( |
|
| 4418 | __( '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' ), |
|
| 4419 | $methodName, |
|
| 4420 | $className, |
|
| 4421 | $tagName, |
|
| 4422 | '<br />' |
|
| 4423 | ) |
|
| 4424 | ); |
|
| 4425 | } |
|
| 4426 | ||
| 4427 | return apply_filters($tagName,null,$this,$args); |
|
| 4428 | } |
|
| 4429 | ||
| 4430 | ||
| 4431 | ||
| @@ 295-301 (lines=7) @@ | ||
| 292 | * @return EE_Form_Input_Base |
|
| 293 | * @throws EE_Error |
|
| 294 | */ |
|
| 295 | public function get_input($name, $require_construction_to_be_finalized = TRUE ){ |
|
| 296 | $subsection = $this->get_subsection($name, $require_construction_to_be_finalized); |
|
| 297 | if( ! $subsection instanceof EE_Form_Input_Base){ |
|
| 298 | throw new EE_Error( |
|
| 299 | sprintf( |
|
| 300 | __( |
|
| 301 | "Subsection '%s' is not an instanceof EE_Form_Input_Base on form '%s'. It is a '%s'", |
|
| 302 | 'event_espresso' |
|
| 303 | ), |
|
| 304 | $name, |
|