Пример #1
0
 function onGridProductValuesFromForm(Am_Event $event)
 {
     $vars = $event->getArg(0);
     if (!$vars['path']) {
         $vars['path'] = null;
     }
     $event->setArg(0, $vars);
 }
Пример #2
0
 function onGridProductValuesToForm(Am_Event $event)
 {
     $args = $event->getArgs();
     $values = $args[0];
     $product = $event->getGrid()->getRecord();
     if ($sliiing_billers = json_decode($product->data()->getBlob('sliiing_billers'), true)) {
         $values['_sliiing_billers'] = $sliiing_billers;
         $event->setArg(0, $values);
     }
 }
Пример #3
0
 function onGridProductValuesToForm(Am_Event $event)
 {
     $args = $event->getArgs();
     $values = $args[0];
     $product = $event->getGrid()->getRecord();
     if ($rate = unserialize($product->data()->getBlob('vat_eu_rate'))) {
         $values['_rate'] = $rate;
         $event->setArg(0, $values);
     }
 }