~magentoerpconnect-core-editors/magentoerpconnect/module-magento-trunk

« back to all changes in this revision

Viewing changes to Openlabs_OpenERPConnector-1.1.0/Openlabs/OpenERPConnector/Model/Olcore/Groups.php

  • Committer: sebastien beau
  • Date: 2012-10-05 13:07:17 UTC
  • Revision ID: sebastien.beau@akretion.com.br-20121005130717-ks668yotjaj6nmy5
[CLEAN] clean syntax code, removing useless space and replacing tab per 4 spaces

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
            return $result;
39
39
        }
40
40
 
41
 
        public function info($groupIds = null)
42
 
        {
43
 
                $groups = array();
 
41
    public function info($groupIds = null)
 
42
    {
 
43
        $groups = array();
44
44
 
45
 
                if(is_array($groupIds))
46
 
                {
47
 
                        foreach($groupIds as $groupId)
48
 
                        {
49
 
                                try
 
45
        if(is_array($groupIds))
 
46
        {
 
47
            foreach($groupIds as $groupId)
 
48
            {
 
49
                try
50
50
                                {
51
51
                                    $groups[] = Mage::getModel('core/store_group')->load($groupId)->toArray();
52
 
                                }
 
52
                }
53
53
                                catch (Mage_Core_Exception $e)
54
54
                                {
55
55
                                    $this->_fault('group_not_exists');
56
56
                                }
57
57
                        }
58
58
                        return $groups;
59
 
                }
 
59
        }
60
60
                elseif(is_numeric($groupIds))
61
 
                {
62
 
                        try
 
61
        {
 
62
            try
63
63
                        {
64
64
                            return Mage::getModel('core/store_group')->load($groupIds)->toArray();
65
 
                        }
 
65
            }
66
66
                        catch (Mage_Core_Exception $e)
67
67
                        {
68
68
                            $this->_fault('group_not_exists');
69
69
                        }
70
70
 
71
71
                }
72
 
                
 
72
        
73
73
        }
74
74
 
75
75
        public function create($groupdata)