Ok, mam xmla :
<?xml version="1.0" encoding="UTF-8"?>
-<plugin update_check="" website="" author="Mateusz" version_human="1.0.0" version_long="10000" name="Promote advertisement">
-<hooks>
-<hook filename="promote_adv" class="\IPS\cms\Records" type="C">
-<![CDATA[//<?php
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
exit;
}
class hook57 extends _HOOK_CLASS_
{
/**
* Process create/edit form
*
* @param array $values Values from form
* @return void
*/
public function processForm( $values )
{
try
{
$values['field_157'] = 1;
parent::processForm( $values );
}
catch ( \RuntimeException $e )
{
if ( method_exists( get_parent_class(), __FUNCTION__ ) )
{
return call_user_func_array( 'parent::' . __FUNCTION__, func_get_args() );
}
else
{
throw $e;
}
}
}
}
]]>
</hook>
</hooks>
<tasks/>
<widgets/>
<htmlFiles/>
<cssFiles/>
<jsFiles/>
<resourcesFiles/>
<lang/>
<versions/>
</plugin>