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

  • AbstractWidget
  • XhtmlWidget
  • Overview
  • Namespace
  • Class
  • Deprecated

Class AbstractWidget

This abstract widget implementation collaborates with a ViewInterface object.

In this collaboration the Widget plays the "view" role and the ViewInterface object the "model" role, where data is stored.

Concrete implementations of an abstract widget specify how the data of the model is rendered into a string.

Nethgui\Widget\AbstractWidget implements Nethgui\Renderer\WidgetInterface, Nethgui\Log\LogConsumerInterface

Direct known subclasses

Nethgui\Module\Help\Widget, Nethgui\Widget\XhtmlWidget

Indirect known subclasses

Nethgui\Widget\Xhtml\Button, Nethgui\Widget\Xhtml\CheckBox, Nethgui\Widget\Xhtml\ObjectPicker, Nethgui\Widget\Xhtml\ObjectsCollection, Nethgui\Widget\Xhtml\Panel, Nethgui\Widget\Xhtml\ProgressBar, Nethgui\Widget\Xhtml\RadioButton, Nethgui\Widget\Xhtml\Selector, Nethgui\Widget\Xhtml\Slider, Nethgui\Widget\Xhtml\Tabs, Nethgui\Widget\Xhtml\TextArea, Nethgui\Widget\Xhtml\TextInput, Nethgui\Widget\Xhtml\CollectionEditor, Nethgui\Widget\Xhtml\TextLabel, Nethgui\Widget\Xhtml\TextList, Nethgui\Widget\Xhtml\Columns, Nethgui\Widget\Xhtml\ElementList, Nethgui\Widget\Xhtml\Fieldset, Nethgui\Widget\Xhtml\FieldsetSwitch, Nethgui\Widget\Xhtml\FileUpload, Nethgui\Widget\Xhtml\Form, Nethgui\Widget\Xhtml\Hidden
Abstract
Namespace: Nethgui\Widget
Author: Davide Principi davide.principi@nethesis.it
Since: 1.0
Api
Located at Widget/AbstractWidget.php
Methods summary
public
# __construct( Nethgui\View\ViewInterface $view )
public
# getAttribute( string $attribute, mixed $default = NULL )

Read an attribute value.

Read an attribute value.

If the attribute has not been set return the given default value.

The second argument can also be a callable. In this case, it is invoked only if a default value is needed, and is expected to return that value. The attribute name will be passed as first function argument.

Parameters

$attribute
The attribute name
$default
The default value or callable closure/function.

Api

Implementation of

Nethgui\Renderer\WidgetInterface::getAttribute()
public Nethgui\Renderer\WidgetInterface
# setAttribute( string $attribute, mixed $value )

Set the given $attribute to $value

Set the given $attribute to $value

Parameters

$attribute
The attribute name
$value
Any value to be assigned to the attribute

Returns

Nethgui\Renderer\WidgetInterface
the current object

Api

Implementation of

Nethgui\Renderer\WidgetInterface::setAttribute()
public boolean
# hasAttribute( string $attribute )

Checks if the widget has the given $attribute

Checks if the widget has the given $attribute

Parameters

$attribute
The attribute name

Returns

boolean
TRUE, if the $attribute has been set to any value

Api

Implementation of

Nethgui\Renderer\WidgetInterface::hasAttribute()
protected static
# getInstanceCounter( )
protected
# prepend( Nethgui\Renderer\WidgetInterface $widget )
public Nethgui\Renderer\WidgetInterface
# insert( Nethgui\Renderer\WidgetInterface $widget )

Nest $widget into the current object

Nest $widget into the current object

Parameters

$widget
Another widget to be nested inside the current object

Returns

Nethgui\Renderer\WidgetInterface
the current object

Api

Implementation of

Nethgui\Renderer\WidgetInterface::insert()
protected
# renderContent( )
protected
# renderChildren( )
protected
# getChildren( )
protected
# hasChildren( )
protected
# wrapChild( $childOutput )
public
# __toString( )
public string
# render( )

Transform the current object in a string value.

Transform the current object in a string value.

Returns

string

Api

Implementation of

Nethgui\Renderer\WidgetInterface::render()
protected
# getClientEventTarget( )
public Nethgui\Log\LogConsumerInterface
# setLog( Nethgui\Log\LogInterface $log )

Change the log attached to the interface implementor

Change the log attached to the interface implementor

Parameters

$log

Returns

Nethgui\Log\LogConsumerInterface

Api

Implementation of

Nethgui\Log\LogConsumerInterface::setLog()
public Nethgui\Log\LogInterface
# getLog( )

The log attached to the interface implementor

The log attached to the interface implementor

Returns

Nethgui\Log\LogInterface

Api

Implementation of

Nethgui\Log\LogConsumerInterface::getLog()
abstract public Nethgui\Widget\AbstractWidget
# insertPlugins( string $name = 'Plugin' )

Insert any (sub)view object found in the view $name collection into the widget.

Insert any (sub)view object found in the view $name collection into the widget.

Parameters

$name
Optional - Default "Plugin"

Returns

Nethgui\Widget\AbstractWidget
the widget itself.

See

Nethgui\Widget\AbstractWidget::insert()

Api

Properties summary
protected Nethgui\View\ViewInterface $view
#
Nethgui Framework API documentation generated by ApiGen