\Ceo\Plugins\ClassifiedsClassifiedInterceptor

Classified interceptor overrides the '/classified[/category] route to allow for backward-compatible loading of Gryphon templates with compatible Category and Ad models.

Looks for templates in the following order:

  • eclipse/main/main.tpl
  • pre1/main/main.tpl
  • snworks/classified/main.tpl

Override default behavior by setting a custom route and overriding the '/classified/*' interceptor.

Returns

  • categories - Snworks\Compat\Model\Category collection
  • category - Snworks\Compat\Model\Category object

Summary

Methods
Properties
Constants
afterRenderUncached()
afterRenderCached()
beforeRenderJson()
beforeRender()
No public properties found
No constants found
overrideView()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

afterRenderUncached()

afterRenderUncached(string  $content) : string

Interceptor called after render on an uncached view.

Can return a string to replace content, or nothing to leave content untouched.

Parameters

string $content

Returns

string

afterRenderCached()

afterRenderCached(string  $content) : string

Interceptor called after render on an cached view.

Can return a string to replace content, or nothing to leave content untouched.

Parameters

string $content

Returns

string

beforeRenderJson()

beforeRenderJson(array  $params = array()) : mixed

Interceptor called before rendering a JSON view. Can return an array of serializable items, or a response object directly.

Parameters

array $params

Returns

mixed —

either Array or \Ceo\Http\Response

beforeRender()

beforeRender(array  $params = array()) : mixed

Interceptor called before rendering an uncached view.

Parameters

array $params

Returns

mixed —

either Array or \Ceo\Http\Response

overrideView()

overrideView(  $path) 

Allows you to override the view after the render process has already selected the template. Only works for Twig and Volt templates.

$this->overrideView('plugins/path/to/view');

Parameters

$path