/** * Gets a cursor for all hiring organizations. * * @param OrganizationInterface $organization parent organization * * @return \Doctrine\ODM\MongoDB\Cursor * @usedBy \Organizations\Entity\Organization::getHiringOrganizations() * @since 0.18 */ public function getHiringOrganizationsCursor(OrganizationInterface $organization) { $qb = $this->createQueryBuilder(); $qb->field('parent')->equals($organization->getId()); $qb->field('isDraft')->equals(false); $q = $qb->getQuery(); $cursor = $q->execute(); return $cursor; }
/** * (non-PHPdoc) * @see \Jobs\Entity\JobInterface::getCompany() */ public function getCompany() { if ($this->organization) { return $this->organization->getOrganizationName()->getName(); } return $this->company; }
/** * Gets the organization form container. * * @param \Organizations\Entity\OrganizationInterface $organization * * @return \Organizations\Form\Organizations */ protected function getFormular($organization) { /* @var $container \Organizations\Form\Organizations */ $services = $this->getServiceLocator(); $forms = $services->get('FormElementManager'); $container = $forms->get('organizations/form', array('mode' => $organization->getId() ? 'edit' : 'new')); $container->setEntity($organization); $container->setParam('id', $organization->id); // $container->setParam('applyId',$job->applyId); if ('__my__' != $this->params('id', '')) { $container->disableForm('employeesManagement'); } else { $container->disableForm('organizationLogo')->disableForm('descriptionForm'); } return $container; }