NikitOS
Well-known member
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:
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:
public static function extendClass($class, &$extensions)
{
if (is_subclass_of($class, 'Needle\AbstractClass'))
{
$extensions[] = 'My\Extension\Class';
}
}
Upvote
2