PHP Class FOF30\Factory\Scaffolding\Layout\BaseErector

Inheritance: implements FOF30\Factory\Scaffolding\Layout\ErectorInterface
Afficher le fichier Open project: akeeba/fof

Protected Properties

Свойство 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

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode 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 méthode

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 méthode

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 méthode

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
Résultat void

getFieldLabel() protected méthode

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
Résultat array

getFieldType() public static méthode

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

getLangKeyPrefix() protected méthode

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

pushResults() protected méthode

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
Résultat Builder

$model protected_oe property

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

$viewName protected_oe property

The name of our view
protected string $viewName
Résultat string

$xml protected_oe property

The XML document we're constructing
protected SimpleXMLElement $xml
Résultat SimpleXMLElement