-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
97 changed files
with
14,956 additions
and
1,504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
CHANGELOG for 1.0.0-alpha3 | ||
=================== | ||
|
||
This changelog references the relevant changes (new features, changes and bugs) done in 1.0.0-alpha3 versions. | ||
|
||
* 1.0.0-alpha3 (2013-06-27) | ||
* Placeholders | ||
* Developer toolbar works with AJAX navigation requests | ||
* Configuring hidden columns in a Grid | ||
* Auto-complete form type | ||
* Added Address Book | ||
* Many-to-many relation between Contacts and Accounts | ||
* Added ability to sort Contacts and Accounts by Phone and Email in a Grid | ||
* Localized countries and regions | ||
* Enhanced data change log with ability to save changes for collections | ||
* Removed dependency on lib ICU | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
UPGRADE FROM 1.0.0-alpha2 to 1.0.0-alpha3 | ||
======================= | ||
|
||
### General | ||
|
||
* Upgrade to 1.0.0-alpha3 is not supported and full reinstall is required | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,3 @@ | |
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
src/OroCRM/Bundle/AccountBundle/Datagrid/AccountContactDatagridManager.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?php | ||
|
||
namespace OroCRM\Bundle\AccountBundle\Datagrid; | ||
|
||
use Doctrine\ORM\QueryBuilder; | ||
|
||
use Oro\Bundle\GridBundle\Datagrid\FlexibleDatagridManager; | ||
use OroCRM\Bundle\AccountBundle\Entity\Account; | ||
use OroCRM\Bundle\ContactBundle\Datagrid\ContactDatagridManager; | ||
use Oro\Bundle\GridBundle\Datagrid\ProxyQueryInterface; | ||
|
||
class AccountContactDatagridManager extends ContactDatagridManager | ||
{ | ||
/** | ||
* @var Account | ||
*/ | ||
protected $account; | ||
|
||
/** | ||
* @param Account $account | ||
*/ | ||
public function setAccount(Account $account) | ||
{ | ||
$this->account = $account; | ||
$this->routeGenerator->setRouteParameters(array('id' => $account->getId())); | ||
} | ||
|
||
/** | ||
* @return Account | ||
* @throws \LogicException | ||
*/ | ||
public function getAccount() | ||
{ | ||
if (!$this->account) { | ||
throw new \LogicException('Datagrid manager has no configured Account entity'); | ||
} | ||
|
||
return $this->account; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
protected function prepareQuery(ProxyQueryInterface $query) | ||
{ | ||
$this->applyJoinWithAddressAndCountry($query); | ||
|
||
$entityAlias = $query->getRootAlias(); | ||
$query->andWhere(":account MEMBER OF $entityAlias.accounts"); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
protected function getQueryParameters() | ||
{ | ||
return array('account' => $this->getAccount()); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
protected function getProperties() | ||
{ | ||
return array(); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function getRowActions() | ||
{ | ||
return array(); | ||
} | ||
} |
Oops, something went wrong.