app/control/admin/SystemProgramForm.class.php
/**
     * method onEdit()
     * Executed whenever the user clicks at the edit button da datagrid
     * @param  $param An array containing the GET ($_GET) parameters
     */
method onEdit()
Executed whenever the user clicks at the edit button da datagrid
@param  $param An array containing the GET ($_GET) parameters
method onEdit () Executed whenever the user clicks at the edit button da datagrid @param $param An array containing the GET ( $_GET ) parameters
public function onEdit($param)
    {
        try
        {
            if (isset($param['key']))
            {
                $key=$param['key'];
                TTransaction::open($this->database);
                $class = $this->activeRecord;
                $object = new $class($key);
                $groups = array();
                if( $groups_db = $object->getSystemGroups() )
                {
                    foreach( $groups_db as $group )
                    {
                        $groups[] = $group->id;
                    }
                }
                $object->groups = $groups;
                $this->form->setData($object);
                TTransaction::close();
                return $object;
            }
            else
            {
                $this->form->clear();
            }
        }
        catch (Exception $e) 
        {
            new TMessage('error', $e->getMessage());
            TTransaction::rollback();
        }
    }
public function onEdit ( $ param ) { try { if ( isset ( $ param [ 'key' ] ) ) { $ key = $ param [ 'key' ] ; TTransaction :: open ( $ this -> database ) ; $ class = $ this -> activeRecord ; $ object = new $ class ( $ key ) ; $ groups = array ( ) ; if ( $ groups_db = $ object -> getSystemGroups ( ) ) { foreach ( $ groups_db as $ group ) { $ groups [ ] = $ group -> id ; } } $ object -> groups = $ groups ; $ this -> form -> setData ( $ object ) ; TTransaction :: close ( ) ; return $ object ; } else { $ this -> form -> clear ( ) ; } } catch ( Exception $ e ) { new TMessage ( 'error' , $ e -> getMessage ( ) ) ; TTransaction :: rollback ( ) ; } }
method onEdit()
 Executed whenever the user clicks at the edit button da datagrid
 @param  $param An array containing the GET ($_GET) parameters
method onEdit () Executed whenever the user clicks at the edit button da datagrid @param $param An array containing the GET ( $_GET ) parameters
// in case of exception