Fix for PHP fatal error in get() function

`$modx->resource->get('context_key')` on line 147 generates an error:
`PHP Fatal error:  Call to a member function get() on a non-object..`
Rewrote it to `$resource->get('context_key')` to solve the problem.