function ObjectManager::find

Finds a object by its identifier.

This is just a convenient shortcut for getRepository($className)->find($id).

Parameters

string:

mixed:

Return value

object

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManager.php, line 42

Class

ObjectManager
Contract for a Doctrine persistence layer ObjectManager class to implement.

Namespace

Doctrine\Common\Persistence

Code

function find($className, $id);