Webiny\Component\Entity\Entity::get PHP Method

get() public method

Get entity instance or false if entity does not exist
public get ( $class, $id ) : boolean | AbstractEntity
$class
$id
return boolean | AbstractEntity
    public function get($class, $id)
    {
        $entityPool = $this->pool->key($class, $this->arr(), true);
        if ($entityPool->keyExists($id)) {
            return $entityPool->key($id);
        }
        return false;
    }