Línea 81... |
Línea 81... |
81 |
*/
|
81 |
*/
|
82 |
public function indexAction()
|
82 |
public function indexAction()
|
83 |
{
|
83 |
{
|
84 |
$currentUserPlugin = $this->plugin('currentUserPlugin');
|
84 |
$currentUserPlugin = $this->plugin('currentUserPlugin');
|
85 |
$currentUser = $currentUserPlugin->getUser();
|
85 |
$currentUser = $currentUserPlugin->getUser();
|
- |
|
86 |
|
Línea 86... |
Línea 87... |
86 |
|
87 |
|
87 |
$request = $this->getRequest();
|
88 |
$request = $this->getRequest();
|
Línea 118... |
Línea 119... |
118 |
$select->columns(['id', 'uuid', 'name', 'status', 'image', 'status']);
|
119 |
$select->columns(['id', 'uuid', 'name', 'status', 'image', 'status']);
|
119 |
$select->from(['c' => CompanyMapper::_TABLE]);
|
120 |
$select->from(['c' => CompanyMapper::_TABLE]);
|
120 |
$select->join(['cu' => CompanyUserMapper::_TABLE], 'cu.company_id = c.id', ['creator']);
|
121 |
$select->join(['cu' => CompanyUserMapper::_TABLE], 'cu.company_id = c.id', ['creator']);
|
121 |
//$select->join(['i' => IndustryMapper::_TABLE], ' i.id = c.industry_id', ['industry' => 'name']);
|
122 |
//$select->join(['i' => IndustryMapper::_TABLE], ' i.id = c.industry_id', ['industry' => 'name']);
|
122 |
//$select->join(['cs' => CompanySizeMapper::_TABLE], 'cs.id = c.company_size_id', ['company_size' => new Expression("concat(minimum_no_of_employee , '-', maximum_no_of_employee)")]);
|
123 |
//$select->join(['cs' => CompanySizeMapper::_TABLE], 'cs.id = c.company_size_id', ['company_size' => new Expression("concat(minimum_no_of_employee , '-', maximum_no_of_employee)")]);
|
- |
|
124 |
$select->where->equalTo('c.network_id', $currentUser->network_id);
|
123 |
$select->where->equalTo('cu.user_id', $currentUser->id);
|
125 |
$select->where->equalTo('cu.user_id', $currentUser->id);
|
124 |
$select->where->in('c.status', [Company::STATUS_ACTIVE, Company::STATUS_PENDING]);
|
126 |
$select->where->in('c.status', [Company::STATUS_ACTIVE, Company::STATUS_PENDING]);
|
125 |
$select->where->in('cu.creator', [CompanyUser::CREATOR_YES]);
|
127 |
$select->where->in('cu.creator', [CompanyUser::CREATOR_YES]);
|
Línea 126... |
Línea 128... |
126 |
|
128 |
|
Línea 262... |
Línea 264... |
262 |
$hydrator = new ObjectPropertyHydrator();
|
264 |
$hydrator = new ObjectPropertyHydrator();
|
263 |
$company = new Company();
|
265 |
$company = new Company();
|
264 |
$hydrator->hydrate($dataPost, $company);
|
266 |
$hydrator->hydrate($dataPost, $company);
|
Línea -... |
Línea 267... |
- |
|
267 |
|
265 |
|
268 |
|
266 |
|
269 |
$company->network_id = $currentUser->network_id;
|
267 |
$company->company_size_id = $companySize->id;
|
270 |
$company->company_size_id = $companySize->id;
|
268 |
$company->industry_id = $industry->id;
|
271 |
$company->industry_id = $industry->id;
|
269 |
$company->foundation_year = date('Y');
|
272 |
$company->foundation_year = date('Y');
|
270 |
$company->status = Company::STATUS_PENDING;
|
273 |
$company->status = Company::STATUS_PENDING;
|
271 |
$company->description = '';
|
- |
|
272 |
|
- |
|
Línea 273... |
Línea 274... |
273 |
$currentUserPlugin = $this->plugin('currentUserPlugin');
|
274 |
$company->description = '';
|
274 |
$currentUser = $currentUserPlugin->getUser();
|
275 |
|
Línea 275... |
Línea 276... |
275 |
|
276 |
|