app/model/admin/SystemGroup.class.php
/**
     * Clone the entire object and related ones
     */
Clone the entire object and related ones
Clone the entire object and related ones
public function cloneGroup()
    {
        $programs = $this->getSystemPrograms();
        $users    = $this->getSystemUsers();
        unset($this->id);
        $this->name .= ' (clone)';
        $this->store();
        if ($programs)
        {
            foreach ($programs as $program)
            {
                $this->addSystemProgram( $program );
            }
        }
        if ($users)
        {
            foreach ($users as $user)
            {
                $this->addSystemUser( $user );
            }
        }
    }
public function cloneGroup ( ) { $ programs = $ this -> getSystemPrograms ( ) ; $ users = $ this -> getSystemUsers ( ) ; unset ( $ this -> id ) ; $ this -> name .= ' (clone)' ; $ this -> store ( ) ; if ( $ programs ) { foreach ( $ programs as $ program ) { $ this -> addSystemProgram ( $ program ) ; } } if ( $ users ) { foreach ( $ users as $ user ) { $ this -> addSystemUser ( $ user ) ; } } }
Clone the entire object and related ones
Clone the entire object and related ones