PHP Class FOF30\Factory\Scaffolding\Layout\BaseErector

Inheritance: implements FOF30\Factory\Scaffolding\Layout\ErectorInterface
Mostra file Open project: akeeba/fof

Protected Properties

Property Type Description
$builder Builder The Builder which called us
$model FOF30\Model\DataModel The Model attached to the view we're building
$viewName string The name of our view
$xml SimpleXMLElement The XML document we're constructing

Public Methods

Method Description
__construct ( Builder $parent, DataModel $model, string $viewName ) Construct the erector object
build ( ) : void Erects a scaffold. It then uses the parent's setXml and setStrings to assign the erected scaffold and the additional language strings to the parent which will decide what to do with that.
getFieldType ( string $type ) : array Convert the database type into something we can use

Protected Methods

Method Description
addString ( string $key, string $value ) Adds a language string definition as long as it doesn't exist in the existing language file.
getFieldLabel ( string $fieldName ) : array Returns the language definition for a field. The hashed array has two keys, label and desc, each one containing the language definition for the label and description of the field. Each definition has the keys key and value with the language key and actual language string.
getLangKeyPrefix ( ) : string Returns the common language key prefix, something like "COM_EXAMPLE_MYVIEW_"
pushResults ( ) Push the form and strings to the builder

Method Details

__construct() public method

Construct the erector object
public __construct ( Builder $parent, DataModel $model, string $viewName )
$parent Builder The parent builder
$model FOF30\Model\DataModel The model we're erecting a scaffold against
$viewName string The view name for this model

addString() protected method

Adds a language string definition as long as it doesn't exist in the existing language file.
protected addString ( string $key, string $value )
$key string The language string key
$value string The language string

build() public method

Erects a scaffold. It then uses the parent's setXml and setStrings to assign the erected scaffold and the additional language strings to the parent which will decide what to do with that.
public build ( ) : void
return void

getFieldLabel() protected method

Returns the language definition for a field. The hashed array has two keys, label and desc, each one containing the language definition for the label and description of the field. Each definition has the keys key and value with the language key and actual language string.
protected getFieldLabel ( string $fieldName ) : array
$fieldName string
return array

getFieldType() public static method

Convert the database type into something we can use
public static getFieldType ( string $type ) : array
$type string The type of the database field
return array

getLangKeyPrefix() protected method

Returns the common language key prefix, something like "COM_EXAMPLE_MYVIEW_"
protected getLangKeyPrefix ( ) : string
return string

pushResults() protected method

Push the form and strings to the builder
protected pushResults ( )

Property Details

$builder protected_oe property

The Builder which called us
protected Builder,FOF30\Factory\Scaffolding\Layout $builder
return Builder

$model protected_oe property

The Model attached to the view we're building
protected DataModel,FOF30\Model $model
return FOF30\Model\DataModel

$viewName protected_oe property

The name of our view
protected string $viewName
return string

$xml protected_oe property

The XML document we're constructing
protected SimpleXMLElement $xml
return SimpleXMLElement