| Línea 36... |
Línea 36... |
| 36 |
use LeadersLinked\Library\QueueEmail;
|
36 |
use LeadersLinked\Library\QueueEmail;
|
| 37 |
use Laminas\Db\Sql\Expression;
|
37 |
use Laminas\Db\Sql\Expression;
|
| 38 |
use LeadersLinked\Model\Notification;
|
38 |
use LeadersLinked\Model\Notification;
|
| 39 |
use LeadersLinked\Mapper\NotificationMapper;
|
39 |
use LeadersLinked\Mapper\NotificationMapper;
|
| 40 |
use LeadersLinked\Library\Functions;
|
40 |
use LeadersLinked\Library\Functions;
|
| - |
|
41 |
use LeadersLinked\Library\Storage;
|
| Línea 41... |
Línea 42... |
| 41 |
|
42 |
|
| 42 |
|
43 |
|
| 43 |
class GroupController extends AbstractActionController
|
44 |
class GroupController extends AbstractActionController
|
| Línea 228... |
Línea 229... |
| 228 |
$select->where->equalTo('tgm.status', GroupMember::STATUS_ACCEPTED);
|
229 |
$select->where->equalTo('tgm.status', GroupMember::STATUS_ACCEPTED);
|
| Línea 229... |
Línea 230... |
| 229 |
|
230 |
|
| Línea 230... |
Línea 231... |
| 230 |
// echo $select->getSqlString($this->adapter->platform); exit;
|
231 |
// echo $select->getSqlString($this->adapter->platform); exit;
|
| - |
|
232 |
|
| Línea 231... |
Línea 233... |
| 231 |
|
233 |
$members = [];
|
| 232 |
$members = [];
|
234 |
$storage = Storage::getInstance($this->config);
|
| 233 |
|
235 |
|
| Línea 234... |
Línea 236... |
| 234 |
$records = $queryMapper->fetchAll($select);
|
236 |
$records = $queryMapper->fetchAll($select);
|
| 235 |
foreach ($records as $record) {
|
237 |
foreach ($records as $record) {
|
| 236 |
$userBlocked = $userBlockedMapper->fetchOneByUserIdAndBlockedId($record['user_id'], $currentUser->id);
|
238 |
$userBlocked = $userBlockedMapper->fetchOneByUserIdAndBlockedId($record['user_id'], $currentUser->id);
|
| 237 |
|
239 |
|
| Línea 238... |
Línea 240... |
| 238 |
array_push($members, [
|
240 |
array_push($members, [
|
| 239 |
'name' => trim($record['first_name'] . ' ' . $record['last_name']),
|
241 |
'name' => trim($record['first_name'] . ' ' . $record['last_name']),
|
| - |
|
242 |
'image' => $storage->getUserImageForCodeAndFilename($record['user_uuid'], $record['image']),
|
| - |
|
243 |
'link_profile' => $userBlocked ? '' : $this->url()->fromRoute('profile/view', ['id' => $record['user_profile_uuid']])
|
| Línea 240... |
Línea 244... |
| 240 |
'image' => $this->url()->fromRoute('storage', ['code' => $record['user_uuid'], 'type' => 'user', 'filename' => $record['image']],['force_canonical' => true]),
|
244 |
|
| 241 |
'link_profile' => $userBlocked ? '' : $this->url()->fromRoute('profile/view', ['id' => $record['user_profile_uuid']])
|
245 |
]);
|
| Línea 254... |
Línea 258... |
| 254 |
'industry' => $industry,
|
258 |
'industry' => $industry,
|
| 255 |
'group_id' => $group->id,
|
259 |
'group_id' => $group->id,
|
| 256 |
'group_type' => $group_type,
|
260 |
'group_type' => $group_type,
|
| 257 |
'group_uuid' => $group->uuid,
|
261 |
'group_uuid' => $group->uuid,
|
| 258 |
'name' => trim($group->name),
|
262 |
'name' => trim($group->name),
|
| 259 |
'image' => $this->url()->fromRoute('storage', ['code' => $group->uuid, 'type' => 'group', 'filename' => $group->image],['force_canonical' => true]),
|
263 |
'image' => $storage->getGroupImage($group),
|
| 260 |
'cover' => $this->url()->fromRoute('storage', ['code' => $group->uuid, 'type' => 'group', 'filename' => $group->cover],['force_canonical' => true]),
|
264 |
'cover' => $storage->getGroupCover($group),
|
| 261 |
'overview' => $group->description,
|
265 |
'overview' => $group->description,
|
| 262 |
'website' => $group->website,
|
266 |
'website' => $group->website,
|
| 263 |
'members' => $members,
|
267 |
'members' => $members,
|
| 264 |
'link_inmail' => $ownerGroup->id != $currentUser->id ? $this->url()->fromRoute('inmail', ['id' => $ownerGroup->uuid]) : '',
|
268 |
'link_inmail' => $ownerGroup->id != $currentUser->id ? $this->url()->fromRoute('inmail', ['id' => $ownerGroup->uuid]) : '',
|
| 265 |
'link_request' => '',
|
269 |
'link_request' => '',
|
| Línea 902... |
Línea 906... |
| 902 |
if ($search) {
|
906 |
if ($search) {
|
| 903 |
$select->where->like('name', '%' . $search . '%');
|
907 |
$select->where->like('name', '%' . $search . '%');
|
| 904 |
}
|
908 |
}
|
| 905 |
$select->order('name ASC');
|
909 |
$select->order('name ASC');
|
| Línea -... |
Línea 910... |
| - |
|
910 |
|
| 906 |
|
911 |
$storage = Storage::getInstance($this->config);
|
| Línea 907... |
Línea 912... |
| 907 |
$records = $queryMapper->fetchAll($select);
|
912 |
$records = $queryMapper->fetchAll($select);
|
| 908 |
|
913 |
|
| Línea 909... |
Línea 914... |
| 909 |
$items = [];
|
914 |
$items = [];
|
| 910 |
foreach ($records as $record) {
|
915 |
foreach ($records as $record) {
|
| 911 |
|
916 |
|
| 912 |
$item = [
|
917 |
$item = [
|
| 913 |
'name' => $record['name'],
|
918 |
'name' => $record['name'],
|
| 914 |
'privacy' => $values[$record['privacy']],
|
919 |
'privacy' => $values[$record['privacy']],
|
| 915 |
'image' => $this->url()->fromRoute('storage', ['type' => 'group', 'code' => $record['uuid'], 'filename' => $record['image']],['force_canonical' => true]),
|
920 |
'image' => $storage->getGroupImageForCodeAndFilename($record['uuid'], $record['image']),
|
| Línea 916... |
Línea 921... |
| 916 |
'link_view' => $this->url()->fromRoute('group/view', ['id' => $record['uuid']]),
|
921 |
'link_view' => $this->url()->fromRoute('group/view', ['id' => $record['uuid']]),
|
| Línea 964... |
Línea 969... |
| 964 |
}
|
969 |
}
|
| 965 |
$select->order('name ASC');
|
970 |
$select->order('name ASC');
|
| Línea 966... |
Línea 971... |
| 966 |
|
971 |
|
| Línea -... |
Línea 972... |
| - |
|
972 |
//echo $select2->getSqlString($this->adapter->platform); exit;
|
| 967 |
//echo $select2->getSqlString($this->adapter->platform); exit;
|
973 |
|
| Línea 968... |
Línea 974... |
| 968 |
|
974 |
$storage = Storage::getInstance($this->config);
|
| 969 |
$records = $queryMapper->fetchAll($select);
|
975 |
$records = $queryMapper->fetchAll($select);
|
| 970 |
|
976 |
|
| 971 |
$items = [];
|
977 |
$items = [];
|
| 972 |
foreach ($records as $record) {
|
978 |
foreach ($records as $record) {
|
| 973 |
$item = [
|
979 |
$item = [
|
| 974 |
'name' => $record['name'],
|
980 |
'name' => $record['name'],
|
| 975 |
'image' => $this->url()->fromRoute('storage', ['type' => 'group', 'code' => $record['uuid'], 'filename' => $record['image']],['force_canonical' => true]),
|
981 |
'image' => $storage->getGroupImageForCodeAndFilename($record['uuid'], $record['image']),
|
| 976 |
'link_view' => $this->url()->fromRoute('group/view', ['id' => $record['uuid']]),
|
982 |
'link_view' => $this->url()->fromRoute('group/view', ['id' => $record['uuid']]),
|
| Línea 1027... |
Línea 1033... |
| 1027 |
}
|
1033 |
}
|
| 1028 |
$select->order('name ASC');
|
1034 |
$select->order('name ASC');
|
| Línea 1029... |
Línea 1035... |
| 1029 |
|
1035 |
|
| Línea -... |
Línea 1036... |
| - |
|
1036 |
//echo $select2->getSqlString($this->adapter->platform); exit;
|
| 1030 |
//echo $select2->getSqlString($this->adapter->platform); exit;
|
1037 |
|
| Línea 1031... |
Línea 1038... |
| 1031 |
|
1038 |
$storage = Storage::getInstance($this->config);
|
| 1032 |
$records = $queryMapper->fetchAll($select);
|
1039 |
$records = $queryMapper->fetchAll($select);
|
| 1033 |
|
1040 |
|
| 1034 |
$items = [];
|
1041 |
$items = [];
|
| 1035 |
foreach ($records as $record) {
|
1042 |
foreach ($records as $record) {
|
| 1036 |
$item = [
|
1043 |
$item = [
|
| 1037 |
'name' => $record['name'],
|
1044 |
'name' => $record['name'],
|
| 1038 |
'image' => $this->url()->fromRoute('storage', ['type' => 'group', 'code' => $record['uuid'], 'filename' => $record['image']],['force_canonical' => true]),
|
1045 |
'image' => $storage->getGroupImageForCodeAndFilename($record['uuid'], $record['image']),
|