Overview

Namespaces

  • Nethgui
    • Adapter
    • Authorization
    • Component
    • Controller
      • Collection
      • Table
    • Exception
    • Log
    • Model
    • Module
      • Help
      • Notification
    • Renderer
    • Serializer
    • System
    • Test
      • Tool
      • Unit
        • Nethgui
          • Adapter
            • ParameterSet
          • Authorization
          • Log
          • Module
            • Notification
          • Renderer
          • Serializer
          • System
          • Utility
          • View
        • Test
          • Tool
    • Utility
    • View
    • Widget
      • Xhtml
  • None
  • Test
    • Tool

Classes

  • AbstractRenderer
  • Json
  • ReadonlyView
  • TemplateRenderer
  • Xhtml

Interfaces

  • WidgetFactoryInterface
  • WidgetInterface
  • Overview
  • Namespace
  • Class
  • Deprecated

Class TemplateRenderer

Renders through a template script or callback method

Enanches the abstract renderer with the wiget factory interface.

Nethgui\Renderer\ReadonlyView implements Nethgui\View\ViewInterface, Nethgui\Log\LogConsumerInterface
Extended by Nethgui\Renderer\AbstractRenderer
Extended by Nethgui\Renderer\TemplateRenderer implements Nethgui\Utility\PhpConsumerInterface, Nethgui\Module\ModuleAttributesInterface, Nethgui\Component\DependencyConsumer

Direct known subclasses

Nethgui\Renderer\Xhtml

Indirect known subclasses

Nethgui\Module\Help\Renderer, Nethgui\Widget\Xhtml\ElementRenderer
Namespace: Nethgui\Renderer
Author: Davide Principi davide.principi@nethesis.it
Since: 1.0
Api
Located at Renderer/TemplateRenderer.php
Methods summary
public
# __construct( Nethgui\View\ViewInterface $view, callable $templateResolver, string $contentType, string $charset )

Parameters

$view
$templateResolver
$contentType
$charset

Overrides

Nethgui\Renderer\ReadonlyView::__construct()
public Nethgui\Renderer\TemplateRenderer
# spawnRenderer( Nethgui\View\ViewInterface $view )

Crete a new instance of the Renderer, bound to the given $view

Crete a new instance of the Renderer, bound to the given $view

Parameters

$view

Returns

Nethgui\Renderer\TemplateRenderer

Api

protected
# getTemplateResolver( )
public string
# render( )

Render the object as a string

Render the object as a string

Returns

string

See

Nethgui\Renderer\TemplateRenderer::getContentType()
Nethgui\Renderer\TemplateRenderer::getCharset()

Api

protected string
# renderView( string|callable $template, array $viewState )

Renders a view passing $viewState as view parameters.

Renders a view passing $viewState as view parameters.

Parameters

$template
$view Full view name that follows class naming convention or function callback
$viewState
Array of view parameters.

Returns

string
public Nethgui\Utility\PhpConsumerInterface
# setPhpWrapper( Nethgui\Utility\PhpWrapper $object )

Parameters

$object

Returns

Nethgui\Utility\PhpConsumerInterface

Implementation of

Nethgui\Utility\PhpConsumerInterface::setPhpWrapper()
public string
# getCategory( )

The category of the aggregated module

The category of the aggregated module

Returns

string
Unique parent module identifier

Api

Implementation of

Nethgui\Module\ModuleAttributesInterface::getCategory()
public string
# getDescription( )

Gets the Module description

Gets the Module description

Returns

string

Api

Implementation of

Nethgui\Module\ModuleAttributesInterface::getDescription()
public string|array
# getLanguageCatalog( )

The name of the language catalog where to search the translated strings

The name of the language catalog where to search the translated strings

Returns

string|array
The language catalog name, or catalog name list

Api

Implementation of

Nethgui\Module\ModuleAttributesInterface::getLanguageCatalog()
public string
# getMenuPosition( )

The menu position of the aggregated module

The menu position of the aggregated module

Returns

string

Api

Implementation of

Nethgui\Module\ModuleAttributesInterface::getMenuPosition()
public string
# getTags( )

Gets module tags.

Gets module tags.

Any composite module must take care of getTags children's call.

Tags are used to search a module among the others

Returns

string

Api

Implementation of

Nethgui\Module\ModuleAttributesInterface::getTags()
public string
# getTitle( )

Gets the Module title

Gets the Module title

Returns

string

Api

Implementation of

Nethgui\Module\ModuleAttributesInterface::getTitle()
public string
# getCharset( )

Get the view content charset enconding

Get the view content charset enconding

EG: UTF-8

Returns

string

Api

public string
# getContentType( )

Get the view content mime type

Get the view content mime type

EG: application/json

Returns

string

Api

public array
# getDependencySetters( )

The returned hash is indexed by the model class name and has a callable objects as value. Each callable is invoked with the model instance as only argument.

The returned hash is indexed by the model class name and has a callable objects as value. Each callable is invoked with the model instance as only argument.

Returns

array

Implementation of

Nethgui\Component\DependencyConsumer::getDependencySetters()
Methods inherited from Nethgui\Renderer\AbstractRenderer
hashToDatasource()
Methods inherited from Nethgui\Renderer\ReadonlyView
copyFrom(), getClientEventTarget(), getCommandList(), getIterator(), getLog(), getModule(), getModulePath(), getModuleUrl(), getPathUrl(), getSiteUrl(), getTargetFormat(), getTemplate(), getTranslator(), getUniqueId(), hasCommandList(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), resolvePath(), setLog(), setTemplate(), spawnView(), translate()
Constants inherited from Nethgui\View\ViewInterface
TARGET_JSON, TARGET_XHTML
Properties summary
protected Nethgui\Utility\PhpWrapper $phpWrapper
#
protected Nethgui\Utility\HttpResponse $httpResponse
#
Properties inherited from Nethgui\Renderer\ReadonlyView
$view
Nethgui Framework API documentation generated by ApiGen