<?php

class listview_class {

    function listview_method( $bean , $events , $arguments ) {
        $format ="Y/m/d h:i:s";

        if( $bean->date_end ){
        $bean->date_end = date($format,strtotime($bean->date_end ));
        $bean->date_due = date($format,strtotime($bean->date_end ));

        }

    }
    function save_history_method( $bean , $events , $arguments ){
        $task_bean = outright_retrieve('outr_task_history' , false, array('task_id_c'=>$bean->id));
							$task_bean->name = 'Automated Task';
							$task_bean->task_id_c = $task->id;
							$task_bean->contact_group_task_id_c = $bean->id;

							$task_bean->save();     
    }
}