[RSS Feed/News] Adding the «extend_class» event

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Based on the thread «Unable to add new field type for custom fields».

The only idea I got was to add an extension to the class that is a child of the abstract I needed, on the fly. However, this is not possible, since the class loading event that XF 1 had is not.
That is, I imagined an event listener like this:
PHP:

Code:
public static function extendClass($class, &$extensions)
{
    if (is_subclass_of($class, 'Needle\AbstractClass'))
    {
        $extensions[] = 'My\Extension\Class';
    }...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom