\Ceo\Modules\Frontend\ControllersMediaController

Media controller is a polymorphic controller that responds differently in different situations depending on the URL.

Summary

Methods
Properties
Constants
initialize()
indexAction()
embedAction()
viewAction()
No public properties found
No constants found
enableCompatibilityView()
terminateWithView()
getHttpCodeDescription()
getRequestSegments()
getJsonData()
No protected properties found
N/A
_multimediaIndexCompat()
_galleryIndexCompat()
No private properties found
N/A

Methods

initialize()

initialize() 

Initialize response headers

indexAction()

indexAction() 

embedAction()

embedAction(  $uuid) 

Parameters

$uuid

viewAction()

viewAction() 

Media view action, by default accepts URLs in the form of:

  • media/SLUG
  • multimedia/SLUG
  • gallery/SLUG

Returns the following items to the view:

Looks for templates in the following order:

IF URL IS 'media':

  • media/index.twig

IF URL IS 'multimedia':

  • multimedia/index.twig
  • media/index.twig

IF URL IS 'gallery':

  • gallery/index.twig
  • media/index.twig

enableCompatibilityView()

enableCompatibilityView(string  $view) : boolean

Enables path to Gryphon compatible view, if the view exists AND enableCompatibility is on.

NOTE: This will mutate the internal view.

Parameters

string $view

Returns

boolean

terminateWithView()

terminateWithView(string  $view, array  $params = array(), array  $headers = array()) 

Terminate the action with a view partial. Will dump output directly to browser, but return the action allowing process to continue.

Parameters

string $view

path

array $params

view params

array $headers

optional headers

getHttpCodeDescription()

getHttpCodeDescription(  $code) 

Parameters

$code

getRequestSegments()

getRequestSegments(  $i = null) : mixed

Return rewrite url segments

Parameters

$i

Returns

mixed —

either all segments as array, or single segment

getJsonData()

getJsonData() : array

Fetch POSTed/PUTed json data

Returns

array

_multimediaIndexCompat()

_multimediaIndexCompat() 

_galleryIndexCompat()

_galleryIndexCompat()