src/OroCRM/Bundle/CallBundle/Controller/CallController.php 1 location
|
@@ 189-199 (lines=11) @@
|
| 186 |
|
* |
| 187 |
|
* @return object|null |
| 188 |
|
*/ |
| 189 |
|
protected function getTargetEntity() |
| 190 |
|
{ |
| 191 |
|
$entityRoutingHelper = $this->get('oro_entity.routing_helper'); |
| 192 |
|
$targetEntityClass = $entityRoutingHelper->getEntityClassName($this->getRequest(), 'targetActivityClass'); |
| 193 |
|
$targetEntityId = $entityRoutingHelper->getEntityId($this->getRequest(), 'targetActivityId'); |
| 194 |
|
if (!$targetEntityClass || !$targetEntityId) { |
| 195 |
|
return null; |
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
return $entityRoutingHelper->getEntity($targetEntityClass, $targetEntityId); |
| 199 |
|
} |
| 200 |
|
} |
| 201 |
|
|
src/OroCRM/Bundle/TaskBundle/Controller/TaskController.php 1 location
|
@@ 226-236 (lines=11) @@
|
| 223 |
|
* |
| 224 |
|
* @return object|null |
| 225 |
|
*/ |
| 226 |
|
protected function getTargetEntity() |
| 227 |
|
{ |
| 228 |
|
$entityRoutingHelper = $this->get('oro_entity.routing_helper'); |
| 229 |
|
$targetEntityClass = $entityRoutingHelper->getEntityClassName($this->getRequest(), 'targetActivityClass'); |
| 230 |
|
$targetEntityId = $entityRoutingHelper->getEntityId($this->getRequest(), 'targetActivityId'); |
| 231 |
|
if (!$targetEntityClass || !$targetEntityId) { |
| 232 |
|
return null; |
| 233 |
|
} |
| 234 |
|
|
| 235 |
|
return $entityRoutingHelper->getEntity($targetEntityClass, $targetEntityId); |
| 236 |
|
} |
| 237 |
|
} |
| 238 |
|
|