src/Charcoal/Property/ObjectProperty.php
protected function loadObject($objId)
    {
        if ($objId instanceof ModelInterface) {
            return $objId;
        }

        $obj = $this->modelLoader()->load($objId);
        if (!$obj->id()) {
            return null;
        } else {
            return $obj;
        }
    }
protected function loadObject($objId)
    {
        if ($objId instanceof ModelInterface) {
            return $objId;
        }

        $obj = $this->modelLoader()->load($objId);
        if (!$obj->id()) {
            return null;
        } else {
            return $obj;
        }
    }
protected function loadObject ( $ objId ) { if ( $ objId instanceof ModelInterface ) { return $ objId ; } $ obj = $ this -> modelLoader ( ) -> load ( $ objId ) ; if ( ! $ obj -> id ( ) ) { return null ; } else { return $ obj ; } }
Retrieve an object by its ID.

Loads the object from the cache store or from the storage source.

@param  mixed $objId Object id.
@return ModelInterface
Retrieve an object by its ID .