/**
* addon data related datawriters
* @devtools verify_array_post_xfupgrade
* @devtools_msg "**new addon data relevant datawriters available?**"
*
* @return array
*/
public static function getAddonDataWriters(){
return [
'XenForo_DataWriter_AddOn',
'XenForo_DataWriter_AdminNavigation',
'XenForo_DataWriter_AdminPermission',
'XenForo_DataWriter_AdminTemplate',
'XenForo_DataWriter_AdminTemplateModification',
'XenForo_DataWriter_CodeEventListener',
'XenForo_DataWriter_CodeEvent',
'XenForo_DataWriter_CodeEventListener',
'XenForo_DataWriter_CronEntry',
'XenForo_DataWriter_EmailTemplate',
'XenForo_DataWriter_EmailTemplateModification',
'XenForo_DataWriter_Option',
'XenForo_DataWriter_OptionGroup',
'XenForo_DataWriter_Permission',
'XenForo_DataWriter_PermissionGroup',
'XenForo_DataWriter_PermissionInterfaceGroup',
'XenForo_DataWriter_Phrase',
'XenForo_DataWriter_RoutePrefix',
'XenForo_DataWriter_StyleProperty',
'XenForo_DataWriter_StylePropertyDefintion',
'XenForo_DataWriter_StylePropertyGroup',
'XenForo_DataWriter_Template',
'XenForo_DataWriter_TemplateModification',
];
}
public static function loadClassDatawriter($class, &$extend){
if (
#!self::$baseExtended &&
in_array($class, self::getAddonDataWriters())){
# self::$baseExtended = true;
$extend[] = 'Devtools_Extend_XenForo_DataWriter';
}
// and inside my proxyclass i'm able to run e.g.
protected function _preSave(){
parent::_preSave();
// xenforo doesn't check if the class exists, bugreport was moved to "feature request" .....
if ($this instanceof XenForo_DataWriter_RoutePrefix){
if ($this->isChanged('route_class'))
{
$class = $this->get('route_class');
if (!XenForo_Application::autoload($class))
{
$this->error(new XenForo_Phrase('please_enter_valid_callback_method_x_y', array('class' => $class)), 'route_class');
}
}
}
}