Class FOFViewJson

Description

FrameworkOnFramework JSON View class. Renders the data as a JSON object or array. It can optionally output HAL links as well.

  • since: 2.0

Located in /libraries/fof/view/json.php (line 20)

JObject
   |
   --FOFView
      |
      --FOFViewRaw
         |
         --FOFViewHtml
            |
            --FOFViewJson
Variable Summary
 boolean $useHypermedia
Method Summary
 FOFViewJson __construct ([array $config = array()])
 boolean onDisplay ([string $tpl = null])
 boolean onRead ([string $tpl = null])
 FOFHalDocument _createDocumentWithHypermedia (array $data, [FOFModel $model = null])
 string _removeURIBase (string $uri)
Variables
Methods
Constructor __construct (line 35)

Public constructor

  • access: public
FOFViewJson __construct ([array $config = array()])
  • array $config: The component's configuration array

Redefinition of:
FOFViewHtml::__construct()
Class constructor
onDisplay (line 52)

The event which runs when we are displaying the record list JSON view

  • return: True to allow display of the view
  • access: protected
boolean onDisplay ([string $tpl = null])
  • string $tpl: The view sub-template to use

Redefinition of:
FOFViewRaw::onDisplay()
Executes before rendering a generic page, default to actions necessary for the Browse task.
onRead (line 154)

The event which runs when we are displaying a single item JSON view

  • return: True to allow display of the view
  • access: protected
boolean onRead ([string $tpl = null])
  • string $tpl: The view sub-template to use

Redefinition of:
FOFViewRaw::onRead()
Executes before rendering the page for the Read task.
_createDocumentWithHypermedia (line 256)

Creates a FOFHalDocument using the provided data

  • return: A HAL-enabled document
  • access: protected
FOFHalDocument _createDocumentWithHypermedia (array $data, [FOFModel $model = null])
  • array $data: The data to put in the document
  • FOFModel $model: The model of this view
_getPrototypeURIForPagination (line 375)

Returns a JUri instance with a prototype URI used as the base for the other URIs created by the JSON renderer

  • return: The prototype JUri instance
  • access: protected
JUri _getPrototypeURIForPagination ()
_removeURIBase (line 351)

Convert an absolute URI to a relative one

  • return: The relative URL
  • access: protected
string _removeURIBase (string $uri)
  • string $uri: The URI to convert

Inherited Methods

Inherited From FOFViewHtml

 FOFViewHtml::__construct()
 FOFViewHtml::postRender()
 FOFViewHtml::preRender()
 FOFViewHtml::renderLinkbar()

Inherited From FOFViewRaw

 FOFViewRaw::__construct()
 FOFViewRaw::display()
 FOFViewRaw::getLists()
 FOFViewRaw::getPerms()
 FOFViewRaw::hasAjaxOrderingSupport()
 FOFViewRaw::onAdd()
 FOFViewRaw::onBrowse()
 FOFViewRaw::onDisplay()
 FOFViewRaw::onEdit()
 FOFViewRaw::onRead()
 FOFViewRaw::postRender()
 FOFViewRaw::preRender()

Inherited From FOFView

 FOFView::__construct()
 FOFView::addHelperPath()
 FOFView::addTemplatePath()
 FOFView::assign()
 FOFView::assignRef()
 FOFView::display()
 FOFView::escape()
 FOFView::findRenderer()
 FOFView::get()
 FOFView::getLayout()
 FOFView::getLayoutTemplate()
 FOFView::getModel()
 FOFView::getName()
 FOFView::getRenderer()
 FOFView::getViewOptionAndName()
 FOFView::loadAnyTemplate()
 FOFView::loadHelper()
 FOFView::loadTemplate()
 FOFView::registerRenderer()
 FOFView::setEscape()
 FOFView::setLayout()
 FOFView::setLayoutExt()
 FOFView::setModel()
 FOFView::setPostRender()
 FOFView::setPreRender()
 FOFView::setRenderer()
 FOFView::_addPath()
 FOFView::_createFileName()
 FOFView::_setPath()

Inherited From JObject

 JObject::__construct()
 JObject::def()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::__toString()

Documentation generated on Tue, 19 Nov 2013 15:06:16 +0100 by phpDocumentor 1.4.3