Proyectos de Subversion LeadersLinked - Services

Rev

Rev 110 | Rev 333 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 110 Rev 283
Línea 29... Línea 29...
29
use LeadersLinked\Mapper\NotificationMapper;
29
use LeadersLinked\Mapper\NotificationMapper;
30
use LeadersLinked\Model\Network;
30
use LeadersLinked\Model\Network;
31
use LeadersLinked\Library\Functions;
31
use LeadersLinked\Library\Functions;
32
use Laminas\Mvc\I18n\Translator;
32
use Laminas\Mvc\I18n\Translator;
33
use LeadersLinked\Cache\CacheInterface;
33
use LeadersLinked\Cache\CacheInterface;
-
 
34
use LeadersLinked\Library\Storage;
Línea 34... Línea 35...
34
 
35
 
35
class CompanyController extends AbstractActionController
36
class CompanyController extends AbstractActionController
36
{
37
{
37
    /**
38
    /**
Línea 176... Línea 177...
176
                } else {
177
                } else {
177
                    $userBlocked = false;
178
                    $userBlocked = false;
178
                }
179
                }
Línea 179... Línea -...
179
                
-
 
-
 
180
                
Línea 180... Línea 181...
180
                
181
                
181
                
182
                $storage = Storage::getInstance($this->config);
182
                
183
                
183
                $data = [
184
                $data = [
Línea 191... Línea 192...
191
                    'link_timeline' => $this->url()->fromRoute('feed/timeline', ['id' => $company->uuid, 'type' => 'company']),
192
                    'link_timeline' => $this->url()->fromRoute('feed/timeline', ['id' => $company->uuid, 'type' => 'company']),
192
                    'total_followers'       => $total_followers,
193
                    'total_followers'       => $total_followers,
193
                    'company_name'          => $company->name,
194
                    'company_name'          => $company->name,
194
                    'company_uuid'          => $company->uuid,
195
                    'company_uuid'          => $company->uuid,
195
                    'name'                  => trim($company->name),
196
                    'name'                  => trim($company->name),
196
                    'image'                 => $this->url()->fromRoute('storage', ['code' =>  $company->uuid, 'type' => 'company', 'filename' => $company->image],['force_canonical' => true]),
197
                    'image'                 => $storage->getCompanyImage($company),
197
                    'cover'                 => $this->url()->fromRoute('storage', ['code' =>  $company->uuid, 'type' => 'company', 'filename' => $company->cover],['force_canonical' => true]),
198
                    'cover'                 => $storage->getCompanyCover($company),
198
                    'overview'              => $company->description,
199
                    'overview'              => $company->description,
199
                    'website'               => $company->website,
200
                    'website'               => $company->website,
200
                    'foundation_year'       => $company->foundation_year,
201
                    'foundation_year'       => $company->foundation_year,
201
                    'facebook'              => $company->facebook,
202
                    'facebook'              => $company->facebook,
202
                    'instagram'             => $company->instagram,
203
                    'instagram'             => $company->instagram,
Línea 982... Línea 983...
982
                }
983
                }
983
                $select->order('name ASC');
984
                $select->order('name ASC');
Línea 984... Línea 985...
984
                                
985
                                
Línea -... Línea 986...
-
 
986
               // echo $select->getSqlString($this->adapter->platform); exit;
985
               // echo $select->getSqlString($this->adapter->platform); exit;
987
                
Línea 986... Línea 988...
986
                
988
                $storage = Storage::getInstance($this->config);
987
                $records = $queryMapper->fetchAll($select);
989
                $records = $queryMapper->fetchAll($select);
988
                
990
                
989
                $items = [];
991
                $items = [];
990
                foreach($records as $record)
992
                foreach($records as $record)
991
                {
993
                {
992
                    $item = [
994
                    $item = [
993
                        'name' => $record['name'],
995
                        'name' => $record['name'],
994
                        'image' => $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $record['uuid'], 'filename' => $record['image']],['force_canonical' => true]),
996
                        'image' => $storage->getCompanyImageForCodeAndFilename($record['uuid'],  $record['image']),
995
                        'link_view' => $this->url()->fromRoute('company/view', ['id' => $record['uuid'] ]),
997
                        'link_view' => $this->url()->fromRoute('company/view', ['id' => $record['uuid'] ]),
Línea 1049... Línea 1051...
1049
                }
1051
                }
1050
                $select->order('name ASC');
1052
                $select->order('name ASC');
Línea 1051... Línea 1053...
1051
                
1053
                
Línea -... Línea 1054...
-
 
1054
                //echo $select2->getSqlString($this->adapter->platform); exit;
1052
                //echo $select2->getSqlString($this->adapter->platform); exit;
1055
                
Línea 1053... Línea 1056...
1053
                
1056
                $storage = Storage::getInstance($this->config);
1054
                $records = $queryMapper->fetchAll($select);
1057
                $records = $queryMapper->fetchAll($select);
1055
                
1058
                
1056
                $items = [];
1059
                $items = [];
1057
                foreach($records as $record)
1060
                foreach($records as $record)
1058
                {
1061
                {
1059
                    $item = [
1062
                    $item = [
1060
                        'name' => $record['name'],
1063
                        'name' => $record['name'],
1061
                        'image' => $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $record['uuid'], 'filename' => $record['image']],['force_canonical' => true]),
1064
                        'image' => $storage->getCompanyImageForCodeAndFilename($record['uuid'], $record['image']),
Línea 1125... Línea 1128...
1125
                $companyUserMapper = CompanyUserMapper::getInstance($this->adapter);    
1128
                $companyUserMapper = CompanyUserMapper::getInstance($this->adapter);    
Línea 1126... Línea 1129...
1126
 
1129
 
Línea -... Línea 1130...
-
 
1130
                
-
 
1131
                $records = $queryMapper->fetchAll($select);
1127
                
1132
                
1128
                $records = $queryMapper->fetchAll($select);
1133
                $storage = Storage::getInstance($this->config);
1129
                
1134
                
Línea 1130... Línea 1135...
1130
                $items = [];
1135
                $items = [];
Línea 1138... Línea 1143...
1138
                        $link_my_company = '';
1143
                        $link_my_company = '';
1139
                    } 
1144
                    } 
Línea 1140... Línea 1145...
1140
                    
1145
                    
1141
                    $item = [
1146
                    $item = [
1142
                        'name' => $record['name'],
1147
                        'name' => $record['name'],
1143
                        'image' => $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $record['uuid'], 'filename' => $record['image']],['force_canonical' => true]),
1148
                        'image' => $storage->getCompanyImageForCodeAndFilename($record['uuid'],  $record['image']),
1144
                        'link_view' => $this->url()->fromRoute('company/view', ['id' => $record['uuid'] ]),
1149
                        'link_view' => $this->url()->fromRoute('company/view', ['id' => $record['uuid'] ]),
1145
                        'link_leave' => $this->url()->fromRoute('company/leave', ['id' => $record['uuid'] ]),
1150
                        'link_leave' => $this->url()->fromRoute('company/leave', ['id' => $record['uuid'] ]),
1146
                        'link_my_company' => $link_my_company
1151
                        'link_my_company' => $link_my_company
Línea 1197... Línea 1202...
1197
                    $select->where->like('c.name', '%' . $search . '%');
1202
                    $select->where->like('c.name', '%' . $search . '%');
1198
                }
1203
                }
1199
                $select->order('name ASC');
1204
                $select->order('name ASC');
Línea 1200... Línea 1205...
1200
                
1205
                
-
 
1206
                $records = $queryMapper->fetchAll($select);
Línea 1201... Línea 1207...
1201
                $records = $queryMapper->fetchAll($select);
1207
                $storage = Storage::getInstance($this->config);
1202
                
1208
                
1203
                $items = [];
1209
                $items = [];
1204
                foreach($records as $record)
1210
                foreach($records as $record)
1205
                {
1211
                {
1206
                    $item = [
1212
                    $item = [
1207
                        'name' => $record['name'],
1213
                        'name' => $record['name'],
1208
                        'image' => $this->url()->fromRoute('storage', ['type' => 'company', 'code' => $record['uuid'], 'filename' => $record['image']],['force_canonical' => true]),
1214
                        'image' => $storage->getCompanyImageForCodeAndFilename($record['uuid'], $record['image']),
1209
                        'link_view' => $this->url()->fromRoute('company/view', ['id' => $record['uuid']]),
1215
                        'link_view' => $this->url()->fromRoute('company/view', ['id' => $record['uuid']]),
Línea 1210... Línea 1216...
1210
                        'link_unfollow' => $this->url()->fromRoute('company/unfollow', ['id' => $record['uuid']]),
1216
                        'link_unfollow' => $this->url()->fromRoute('company/unfollow', ['id' => $record['uuid']]),