PHP Class FOF30\Factory\Scaffolding\Layout\Builder

Creates an automatic XML form definition to render a view based on the database fields you've got in the model. This is not designed for production; it's designed to give you a way to quickly add some test data to your component and get started really fast with FOF development.
ファイルを表示 Open project: akeeba/fof Class Usage Examples

Protected Properties

Property Type Description
$container The container we belong to
$saveScaffolding Should I save the scaffolding results?
$strings Language string definitions we need to add to the component's language file
$xml The form we will be returning to the caller

Public Methods

Method Description
__construct ( Container $c ) Create the scaffolding builder instance
getContainer ( ) : Container Gets the container this builder belongs to
make ( string $requestedFilename, string $viewName ) : string | null Make a new scaffolding document
setStrings ( array $strings ) Set the additional strings array
setXml ( SimpleXMLElement $xml ) Set the XML form document

Protected Methods

Method Description
applyStrings ( ) Load the strings array in Joomla!'s JLanguage object
saveStrings ( string $targetFilename = null ) Saves the language strings, merged with any old ones, to a Joomla! INI language file
saveXml ( string $requestedFilename, string $viewName ) Save the XML form as a file

Method Details

__construct() public method

Create the scaffolding builder instance
public __construct ( Container $c )
$c FOF30\Container\Container

applyStrings() protected method

Load the strings array in Joomla!'s JLanguage object
protected applyStrings ( )

getContainer() public method

Gets the container this builder belongs to
public getContainer ( ) : Container
return FOF30\Container\Container

make() public method

Make a new scaffolding document
public make ( string $requestedFilename, string $viewName ) : string | null
$requestedFilename string The requested filename, e.g. form.default.xml
$viewName string The name of the view this form will be used to render
return string | null The XML source or null if we can't make a scaffolding XML

saveStrings() protected method

Saves the language strings, merged with any old ones, to a Joomla! INI language file
protected saveStrings ( string $targetFilename = null )
$targetFilename string The full path to the INI file, leave blank for auto-detection

saveXml() protected method

Save the XML form as a file
protected saveXml ( string $requestedFilename, string $viewName )
$requestedFilename string The requested filename, e.g. form.default.xml
$viewName string The name of the view this form will be used to render

setStrings() public method

Set the additional strings array
public setStrings ( array $strings )
$strings array The strings array to set

setXml() public method

Set the XML form document
public setXml ( SimpleXMLElement $xml )
$xml SimpleXMLElement The XML document to set

Property Details

$container protected_oe property

The container we belong to
protected $container

$saveScaffolding protected_oe property

Should I save the scaffolding results?
protected $saveScaffolding

$strings protected_oe property

Language string definitions we need to add to the component's language file
protected $strings

$xml protected_oe property

The form we will be returning to the caller
protected $xml